Skip to content

Go 开源ライブラリ大全

いくつかのオープンソース Go サードパーティライブラリとフレームワークを収集し、整理・分類して、後続の閲覧を容易にします。新しいプロジェクトの PR 提出も歓迎します。

TIP

先后順序不代表排名,好不好用要根据实际体验来看。

Web フレームワーク

名前説明リポジトリ
gin最もクラシックな web フレームワークhttps://github.com/gin-gonic/gin
beego中国人が開発した web フレームワークhttps://github.com/beego/beego
iris最速を謳う web フレームワークhttps://github.com/kataras/iris
echo極簡で高性能な web フレームワークhttps://github.com/labstack/echo
goji简洁な web フレームワークhttps://github.com/zenazn/goji
revel高可用性のフルスタック web フレームワークhttps://github.com/revel/revel
buffaloシンプルにフルスタックプロジェクトを構築できる web フレームワークhttps://github.com/gobuffalo/buffalo
hertz高性能と高拡張性を備えたマイクロサービス HTTP フレームワーク(ByteDance 开源)https://github.com/cloudwego/hertz
dotwebシンプルなミニマル web フレームワークhttps://github.com/devfeel/dotweb
fiberNode.js Express スタイルの Web フレームワークhttps://github.com/gofiber/fiber

ORM

名前説明リポジトリ
gorm開発者フレンドリーな ORM ライブラリhttps://github.com/go-gorm/gorm
xormシンプルで強力な ORMhttps://gitea.com/xorm/xorm
entFacebook 开源の ORMhttps://github.com/ent/ent
sqlxsql ライブラリの強力な拡張https://github.com/jmoiron/sqlx
beego/ormbeego 標準搭載の ormhttps://github.com/astaxie/beego/tree/master/orm
rel拡張可能なモダン ORMhttps://github.com/go-rel/rel
bunSQL 優先の ORMhttps://github.com/uptrace/bun

マイクロサービスフレームワーク

名前説明リポジトリ
kratosクラウドネイティブマイクロサービスフレームワーク(Bilibili 开源)https://github.com/go-kratos/kratos
go-kitマイクロサービス開発のためのツールライブラリhttps://github.com/go-kit/kit
kitex高性能と高拡張性を備えたマイクロサービスフレームワーク(ByteDance 开源)https://github.com/cloudwego/kitex
go-zeroクラウドネイティブマイクロサービスフレームワーク(七牛云开源)https://github.com/zeromicro/go-zero
go-micro海外のマイクロサービスフレームワークhttps://github.com/go-micro/go-micro
kiteマイクロサービスフレームワーク(長期間更新なし)https://github.com/koding/kite
dubbo-goJava dubbo の Go 実装(アリババ开源)https://github.com/apache/dubbo-go
tarsgotars の Go 実装(テンセント开源)https://github.com/TarsCloud/TarsGo
juptiersガバナンス指向のマイクロサービスフレームワーク(斗鱼开源)https://github.com/douyu/jupiter
redsyncredis 分散ロックhttps://github.com/go-redsync/redsync

彩蛋

斗鱼の jupiter はゼウスの名前であり、神々の王です。一方、B 站の kratos は戦神クレイトスの名前で、クレイトスは後に神々の王ゼウスを殺しました。

ログコンポーネント

名前説明リポジトリ
logrus構造化ログライブラリhttps://github.com/sirupsen/logrus
zapuber 开源の高性能ログライブラリhttps://github.com/uber-go/zap
glog階層別実行ログhttps://github.com/golang/glog
zerologゼロメモリ割り当ての json ログhttps://github.com/rs/zerolog
apex/log構造化ログライブラリhttps://github.com/apex/log
lumberjackログ分割ライブラリ、サイズ分割、日付分割、ファイル圧縮をサポートhttps://github.com/natefinch/lumberjack

テストコンポーネント

名前説明リポジトリ
testify最も人気なテストツールキットhttps://github.com/stretchr/testify
ginkgoモダンなテストフレームワークhttps://github.com/onsi/ginkgo
ramsqlメモリベースの SQL エンジン、主に SQL の単体テスト用https://github.com/proullon/ramsql
go-sqlmockテスト用の SQL Mockhttps://github.com/DATA-DOG/go-sqlmock
goconveyブラウザで可視化テストhttps://github.com/smartystreets/goconvey
go-stress-testing負荷テストツールhttps://github.com/link1st/go-stress-testing
xgoGo 打桩テストフレームワーク、コンパイル時にコードを重写して実装https://github.com/xhd2015/xgo
gomonkeyGo 打桩テストフレームワーク、関数アドレスを変更して実装https://github.com/agiledragon/gomonkey

データ処理

名前説明リポジトリ
mapstructuremap と構造体の相互変換https://github.com/mitchellh/mapstructure
castデータ型変換を簡単に行えるhttps://github.com/spf13/cast
deepcopy深層コピーhttps://github.com/mohae/deepcopy
copier構造体間で同名フィールドの値をコピーhttps://github.com/jinzhu/copier
go-pinyin漢字を拼音に変換https://github.com/mozillazg/go-pinyin
go-streamsストリーム形式のデータ処理https://github.com/reugn/go-streams
streamストリーム処理https://github.com/xyctruth/stream
go-humanizeデータを人間が読める形式に変換https://github.com/dustin/go-humanize
unisegGo で Unicode テキストセグメンテーション、ワードラッピング、文字列幅計算https://github.com/rivo/uniseg

データ検証

名前説明リポジトリ
go-playground/validator/v10データ検証器https://github.com/go-playground/validator
go-cmpグーグル开源の値比較ライブラリhttps://github.com/google/go-cmp
ozzo-validationルールベースのデータ検証ライブラリhttps://github.com/go-ozzo/ozzo-validation
go-tagexpr構造体 tag 検証ライブラリhttps://github.com/bytedance/go-tagexpr

データ構造

名前説明リポジトリ
gods一般的なデータ構造の実装https://github.com/emirpasic/gods
go-datastructures一般的なデータ構造の実装https://github.com/Workiva/go-datastructures
bisetGo での bitsets の実装https://github.com/bits-and-blooms/bitset
bloomGo での bloom filters の実装https://github.com/bits-and-blooms/bloom
deque高性能双端キューの実装https://github.com/edwingeng/deque
concurrent-map並行安全なシャード map 実装https://github.com/orcaman/concurrent-map
samber/loLodash スタイルのデータ処理ライブラリ、ジェネリクス対応https://github.com/samber/lo
google/btreeグーグル実装の BTree ライブラリ、ジェネリクス対応https://github.com/google/btree
gostlC++ STL のようなデータ構造ライブラリhttps://github.com/liyue201/gostl

数学計算

名前説明リポジトリ
gonumnumpy に相当するhttps://github.com/gonum/gonum
decimal高精度浮動小数点演算ライブラリhttps://github.com/shopspring/decimal
crunchバイトとビット演算を簡素化するライブラリhttps://github.com/superwhiskers/crunch
math-engine数学式解析計算エンジンライブラリhttps://github.com/dengsgo/math-engine

テンプレートエンジン

名前説明リポジトリ
pongo2Django スタイルのテンプレートエンジンhttps://github.com/flosch/pongo2
acehtml テンプレートエンジンhttps://github.com/yosssi/ace
mustachemustache の Go 実装https://github.com/hoisie/mustache
hero機能豊富で高速なテンプレートエンジンhttps://github.com/shiyanhui/hero
quicktemplate高性能テンプレートエンジンhttps://github.com/valyala/quicktemplate
amberHAML と Jade に由来するテンプレートエンジンhttps://github.com/eknkc/amber

キャッシュコンポーネント

名前説明リポジトリ
golang-lruスレッドセーフな LRU、および LRU 2Q キャッシュhttps://github.com/hashicorp/golang-lru
ttlcacheメモリベースのキャッシュ、TTL、ジェネリクス対応https://github.com/jellydator/ttlcache
gocacheキャッシュミドルウェアマネージャーhttps://github.com/eko/gocache
go-cacheメモリベースのキャッシュ、シングルマシンアプリケーション用、TTL 対応https://github.com/patrickmn/go-cache
ristretto高性能メモリキャッシュhttps://github.com/dgraph-io/ristretto
bigcacheメモリベースの高效率な大規模 key キャッシュhttps://github.com/allegro/bigcache

データベース&ドライバー

名前説明リポジトリ
modernc.org/sqlitesqlite ドライバー、純粋な Go で記述、cgo 不要https://gitlab.com/cznic/sqlite
mattn/go-sqlite3sqlite ドライバー、cgo 必要https://github.com/mattn/go-sqlite3
denisenkom/go-mssqldbsqlserver ドライバー、更新があまり行われていない、マイクロソフト版を推奨https://github.com/denisenkom/go-mssqldb
microsoft/go-mssqldbsqlserver ドライバー、マイクロソフトが fork してメンテナンスhttps://github.com/microsoft/go-mssqldb
pgxpostgreSQL ドライバーhttps://github.com/jackc/pgx/
mysqlmysql ドライバーhttps://github.com/go-sql-driver/mysql
oci-go-sdkoracle 公式ドライバーhttps://github.com/oracle/oci-go-sdk
go-oraoracle ドライバー、純粋な Go で記述https://github.com/sijms/go-ora
badger組み込み型 kv データベース、LSM ベースhttps://github.com/dgraph-io/badger
boltdb組み込み型 kv データベース、B+Tree ベースhttps://github.com/boltdb/bolt
goleveldbGo 言語実装の leveldbhttps://github.com/syndtr/goleveldb
qmgo七牛云开源の mongodb 操作ライブラリhttps://github.com/qiniu/qmgo
mongo-go-drivermongodb 公式 Go ドライバーhttps://github.com/mongodb/mongo-go-driver
rqlitesqlite ベースの軽量級分散関係データベースhttps://github.com/rqlite/rqlite/
go-mysql強力な MySQL ツールセットhttps://github.com/go-mysql-org/go-mysql
go-mysql-elasticsearchMySQL データを Elasticsearch に同期するツールhttps://github.com/go-mysql-org/go-mysql-elasticsearch
gofoundシングルマシン億レベル全文検索エンジン、https://github.com/sea-team/gofound
bleve全文検索ライブラリhttps://github.com/blevesearch/bleve

シリアライゼーション

名前説明リポジトリ
go-iniini ファイルシリアライゼーションライブラリhttps://github.com/go-ini/ini
sonic字节开源の高性能 json シリアライゼーションライブラリhttps://github.com/bytedance/sonic
easyjsonjson 高速シリアライゼーションライブラリhttps://github.com/mailru/easyjson
gjsonjson キー値の高速取得、非伝統的シリアライゼーションライブラリhttps://github.com/tidwall/gjson
go-yamlyaml シリアライゼーションライブラリhttps://github.com/go-yaml/yaml
go-tomltoml シリアライゼーションライブラリhttps://github.com/pelletier/go-toml
propertiesproperties シリアライゼーションライブラリhttps://github.com/magiconair/properties
viper複数データフォーマット対応シリアライゼーション、設定マネージャーhttps://github.com/spf13/viper
configorgorm 作者が書いた複数データフォーマットシリアライザー、設定マネージャーhttps://github.com/jinzhu/configor

コマンドライン

名前説明リポジトリ
pflagPOSIX/GUN スタイルの flag パッケージhttps://github.com/spf13/pflag
go-flagsコマンド引数解析器https://github.com/jessevdk/go-flags
cobraモダンなコマンドラインプログラム構築スキャフォールドhttps://github.com/spf13/cobra
dimiro1/banner美しいバナー構築ライブラリhttps://github.com/dimiro1/banner
go-pretty美しいコマンドラインテーブル、テキスト、プログレスバー出力https://github.com/jedib0t/go-pretty
progressbarスレッドセーフなコマンドラインプログレスバーhttps://github.com/schollz/progressbar
go-ansiGo 言語用 Windows 移植 ANSI エスケープシーケンスユーティリティhttps://github.com/k0kubun/go-ansi
go-isattytty 判定ライブラリhttps://github.com/mattn/go-isatty

圧縮・解凍

名前説明リポジトリ
klauspost/compresscompress 標準ライブラリの最適化改造https://github.com/klauspost/compress
alexmullins/ziparchive/zip 標準ライブラリの fork ブランチ、パスワード対応https://github.com/alexmullins/zip
mholt/archiver多数フォーマット対応の圧縮・解凍ツールライブラリ(個人非常におすすめ)https://github.com/mholt/archiver
go-carCAR アーカイブファイルの Go 実装https://github.com/ipld/go-car
go-unarr圧縮・解凍ライブラリhttps://github.com/gen2brain/go-unarr
xzxz 圧縮ファイルの読み書き用純粋 Golang ライブラリhttps://github.com/ulikunitz/xz

日時処理

名前説明リポジトリ
carbon日時処理ライブラリhttps://github.com/golang-module/carbon
robfig/cron定时タスクライブラリhttps://pkg.go.dev/github.com/robfig/cron/v3
gron定时タスクライブラリhttps://github.com/roylee0704/gron
jobrunner非同期定时タスクフレームワークhttps://github.com/bamzi/jobrunner
dateparseフォーマット不明でも日時文字列を解析可能https://github.com/araddon/dateparse
jinzhu/now日時ツールライブラリhttps://github.com/jinzhu/now

依存注入

名前説明リポジトリ
diguber 开源の依存注入ライブラリ、リフレクションベースhttps://darjun.github.io/2020/02/22/godailylib/dig/
wireグーグル开源の依存注入ライブラリ、コード生成ベースhttps://github.com/google/wire
inject依存注入ツールhttps://github.com/codegangsta/inject
di依存注入コンテナhttps://github.com/sarulabs/di

地理位置

名前説明リポジトリ
geoip2-golangIP 地理位置情報https://github.com/oschwald/geoip2-golang
ip2location-goIP 地理位置情報https://github.com/ip2location/ip2location-go

クローラーフレームワーク

名前説明リポジトリ
collyシンプルで強力なクローラーフレームワークhttps://github.com/gocolly/colly
goqueryj-query に類似https://github.com/PuerkitoBio/goquery

ネットワークツール

名前説明リポジトリ
gentlemanプラグイン駆動、拡張可能な http クライアントhttps://github.com/h2non/gentleman
restyrestful http クライアントhttps://pkg.go.dev/github.com/go-resty/resty/v2
gopeed全プラットフォーム対応のモダンダウンロードマネージャー、Go と flutter ベースhttps://github.com/GopeedLab/gopeed

電子メール

名前説明リポジトリ
jordan-wright/email堅牢で柔軟なメール送信ライブラリhttps://github.com/jordan-wright/email
gomailメール送信ライブラリhttps://github.com/go-gomail/gomail
go-simple-mailシンプルなメール送信ライブラリhttps://github.com/xhit/go-simple-mail
go-mail使いやすく包括的なメール送信ライブラリhttps://github.com/wneessen/go-mail
email-verifierメールアドレス有効性検証、メール送信不要https://github.com/AfterShip/email-verifier
maddy組合せ式メールサーバーhttps://github.com/foxcpp/maddy
mox全面的オープンソース、高メンテナンス性、自ホスト型メールサーバーhttps://github.com/mjl-/mox
hermesメールテンプレート生成ライブラリhttps://github.com/matcornic/hermes
listmonk高性能、自ホスト、可視化メールリスト管理https://github.com/knadh/listmonk
go-smtpGo 実装の SMTP クライアントとサーバーhttps://github.com/emersion/go-smtp
go-imapGo 実装の IMAP クライアントとサーバーhttps://github.com/emersion/go-imap

ゲーム開発

名前説明リポジトリ
ebitengine非常にシンプルな 2d ゲームエンジンhttps://github.com/hajimehoshi/ebiten
Azul3DGo で記述された 3d ゲームエンジンhttps://github.com/azul3d/engine
engoGo で記述されたオープンソース 2d ゲームエンジンhttps://github.com/EngoEngine/engo
g3n/engineGo 3d ゲームエンジンhttps://github.com/g3n/engine
gonetゲームサーバーフレームワークhttps://github.com/xtaci/gonet
leafゲームサーバーフレームワークhttps://github.com/name5566/leaf
cloud-gameWeb ベースのクラウドゲームサービスhttps://github.com/giongto35/cloud-game

GUI

名前説明リポジトリ
fyneクロスプラットフォーム GUI 開発ツールキット(本当に何かある)https://github.com/fyne-io/fyne
go-flutterGo で flutter を記述https://github.com/go-flutter-desktop/go-flutter
WailsGo の高速かつ軽量な Electron 代替品と見なせるhttps://github.com/wailsapp/wails

システム対話

名前説明リポジトリ
gopsutilOS 情報取得、主要システム対応https://github.com/shirou/gopsutil
flockOS 呼び出しベースのファイルロックhttps://github.com/gofrs/flock
sys公式 OS 対話ライブラリhttps://cs.opensource.google/go/x/sys

言語間対話

名前説明リポジトリ
gopher-luaGo 実装の lua 仮想機https://github.com/yuin/gopher-lua
go-luaGo 実装の lua 仮想機https://github.com/Shopify/go-lua
gojaes5.1+ 対応https://github.com/dop251/goja
tengoTengo は小型、動的、高速、安全な Go スクリプト言語https://github.com/d5/tengo
gobyruby に触発され、Go で実装された解釈型スクリプト言語https://github.com/goby-lang/goby
go+七牛云开源のスクリプト言語、Go とシームレス対話可能、Q 言語とも呼ばれるhttps://github.com/goplus/gop
go-pythonGo から cpython2 を呼び出すhttps://github.com/sbinet/go-python
go-python3Go から cpython3 を呼び出すhttps://github.com/DataDog/go-python3

画像処理

名前説明リポジトリ
plotプロットライブラリ、主にデータ可視化用https://github.com/gonum/plot
gg2d 描画ライブラリhttps://github.com/fogleman/gg
gocvopencv4+ 対応https://github.com/hybridgroup/gocv
imagingシンプルな画像処理ライブラリhttps://github.com/disintegration/imaging

テキスト処理

名前説明リポジトリ
vale文法認識テキスト校正ツールhttps://github.com/errata-ai/vale

認証認可

名前説明リポジトリ
casbin柔軟で強力な権限管理ライブラリhttps://github.com/casbin/casbin
openfga高性能権限/認可ライブラリ、Google Zanzibar 由来https://github.com/openfga/openfga

コード生成

名前説明リポジトリ
jenniferコード生成ライブラリhttps://github.com/dave/jennifer

正規表現処理

名前説明リポジトリ
commonregx一般的な正規表現コレクションライブラリhttps://github.com/mingrammer/commonregex

ファイル処理

名前説明リポジトリ
fileboxファイル操作ツールライブラリhttps://github.com/dstgo/filebox
sizeファイルサイズと文字列間の高速変換https://github.com/dstgo/size
checksumファイルハッシュ署名計算ライブラリhttps://github.com/codingsince1985/checksum
pdfcpupdf プロセッサhttps://github.com/pdfcpu/pdfcpu
uniofficeoffice 処理ライブラリhttps://github.com/unidoc/unioffice
gooxmloffice 処理ライブラリhttps://github.com/carmel/gooxml
pdfcpuPDF 処理ライブラリhttps://github.com/pdfcpu/pdfcpu
excelizeExcel 処理ライブラリhttps://github.com/360EntSecGroup-Skylar/excelize

汎用ツール

名前説明リポジトリ
lancet多機能ツールライブラリ、Java の common パッケージに相当https://github.com/duke-git/lancet
bytebufferpoolバイトバッファプールhttps://github.com/valyala/bytebufferpool

開発フレームワーク

名前説明リポジトリ
goframeモダン企業級 Go 開発フレームワークhttps://github.com/gogf/gf

コンセンサスプロトコル

名前説明リポジトリ
hashicorp/raftconsul 开源の raft ライブラリhttps://github.com/hashicorp/raft
hashicorp/memberlistconsul 开源の gossip ライブラリhttps://github.com/hashicorp/memberlist
etcd-io/raftetcd 开源の raft ライブラリhttps://github.com/etcd-io/raft

OCR

名前説明リポジトリ
gosseractTesseract C++ ライブラリ使用の OCR ライブラリhttps://github.com/otiai10/gosseract

Golang学习网由www.golangdev.cn整理维护