Skip to content

Tổng hợp thư viện mã nguồn mở Go

Thu thập và phân loại một số thư viện và framework go bên thứ ba mã nguồn mở, thuận tiện cho việc xem sau này, cũng hoan nghênh提交 pr để thêm các dự án mới.

TIP

Thứ tự trước sau không đại diện cho xếp hạng, có好用 hay không cần căn cứ vào trải nghiệm thực tế.

Web Framework

TênMô tảKho lưu trữ
ginWeb framework kinh điển nhấthttps://github.com/gin-gonic/gin
beegoWeb framework do người Trung Quốc phát triểnhttps://github.com/beego/beego
irisWeb framework được cho là nhanh nhấthttps://github.com/kataras/iris
echoWeb framework hiệu năng cao cực kỳ đơn giảnhttps://github.com/labstack/echo
gojiWeb framework đơn giảnhttps://github.com/zenazn/goji
revelWeb framework full-stack khả dụng caohttps://github.com/revel/revel
buffaloWeb framework có thể đơn giản xây dựng các dự án full-stackhttps://github.com/gobuffalo/buffalo
hertzFramework HTTP vi dịch vụ có hiệu năng cao và khả năng mở rộng mạnh mẽ (ByteDance mở nguồn)https://github.com/cloudwego/hertz
dotwebMột web framework vi mô đơn giảnhttps://github.com/devfeel/dotweb
fiberWeb framework phong cách Node.js Expresshttps://github.com/gofiber/fiber

ORM

TênMô tảKho lưu trữ
gormThư viện ORM thân thiện với nhà phát triểnhttps://github.com/go-gorm/gorm
xormORM đơn giản và mạnh mẽhttps://gitea.com/xorm/xorm
entORM do Facebook mở nguồnhttps://github.com/ent/ent
sqlxMở rộng mạnh mẽ cho thư viện sqlhttps://github.com/jmoiron/sqlx
beego/ormorm đi kèm của beegohttps://github.com/astaxie/beego/tree/master/orm
relORM hiện đại có thể mở rộnghttps://github.com/go-rel/rel
bunORM ưu tiên SQLhttps://github.com/uptrace/bun

Framework Vi Dịch Vụ

TênMô tảKho lưu trữ
kratosFramework vi dịch vụ cloud native (Bilibili mở nguồn)https://github.com/go-kratos/kratos
go-kitMột thư viện công cụ phát triển vi dịch vụhttps://github.com/go-kit/kit
kitexFramework vi dịch vụ hiệu năng cao và khả năng mở rộng (ByteDance mở nguồn)https://github.com/cloudwego/kitex
go-zeroFramework vi dịch vụ cloud native (Qiniu Cloud mở nguồn)https://github.com/zeromicro/go-zero
go-microMột framework vi dịch vụ nước ngoàihttps://github.com/go-micro/go-micro
kiteFramework vi dịch vụ (đã lâu không cập nhật)https://github.com/koding/kite
dubbo-goJava dubbo triển khai trong go (Alibaba mở nguồn)https://github.com/apache/dubbo-go
tarsgoTars triển khai trong go (Tencent mở nguồn)https://github.com/TarsCloud/TarsGo
juptiersFramework vi dịch vụ hướng quản trị (Douyu mở nguồn)https://github.com/douyu/jupiter
redsyncKhóa phân tán redishttps://github.com/go-redsync/redsync

Trứng phục sinh

jupiter của Douyu là tên của thần Zeus, là vua của các vị thần, còn kratos của Bilibili là tên của thần chiến tranh Kratos, Kratos sau này đã giết chết vua của các vị thần Zeus.

Thành Phần Log

TênMô tảKho lưu trữ
logrusThư viện log có cấu trúchttps://github.com/sirupsen/logrus
zapThư viện log hiệu năng cao do uber mở nguồnhttps://github.com/uber-go/zap
glogLog thực thi phân cấphttps://github.com/golang/glog
zerologLog json không phân bổ bộ nhớhttps://github.com/rs/zerolog
apex/logThư viện log có cấu trúchttps://github.com/apex/log
lumberjackThư viện phân tách log, hỗ trợ phân tách theo kích thước, phân tách theo ngày, nén tệphttps://github.com/natefinch/lumberjack

Thành Phần Kiểm Thử

TênMô tảKho lưu trữ
testifyGói công cụ kiểm thử phổ biến nhấthttps://github.com/stretchr/testify
ginkgoFramework kiểm thử hiện đạihttps://github.com/onsi/ginkgo
ramsqlEngine SQL dựa trên bộ nhớ, chủ yếu dùng cho kiểm thử đơn vị SQLhttps://github.com/proullon/ramsql
go-sqlmockSQL Mock dùng cho kiểm thửhttps://github.com/DATA-DOG/go-sqlmock
goconveyKiểm thử trực quan hóa trong trình duyệthttps://github.com/smartystreets/goconvey
go-stress-testingCông cụ kiểm thử áp lựchttps://github.com/link1st/go-stress-testing
xgoFramework kiểm thử đóng dấu go, thực hiện thông qua viết lại mã trong thời gian biên dịchhttps://github.com/xhd2015/xgo
gomonkeyFramework kiểm thử đóng dấu go, thực hiện thông qua sửa đổi địa chỉ hàmhttps://github.com/agiledragon/gomonkey

Xử Lý Dữ Liệu

TênMô tảKho lưu trữ
mapstructureChuyển đổi qua lại giữa map và structhttps://github.com/mitchellh/mapstructure
castChuyển đổi kiểu dữ liệu rất thuận tiệnhttps://github.com/spf13/cast
deepcopySao chép sâuhttps://github.com/mohae/deepcopy
copierCó thể sao chép giá trị giữa các struct có cùng tên trườnghttps://github.com/jinzhu/copier
go-pinyinChuyển Hán tự sang pinyinhttps://github.com/mozillazg/go-pinyin
go-streamsXử lý dữ liệu theo luồnghttps://github.com/reugn/go-streams
streamXử lý theo luồnghttps://github.com/xyctruth/stream
go-humanizeChuyển đổi dữ liệu thành định dạng mà con người có thể đọc đượchttps://github.com/dustin/go-humanize
unisegPhân đoạn văn bản Unicode, bọc từ và tính toán chiều rộng chuỗi trong Gohttps://github.com/rivo/uniseg

Xác Thực Dữ Liệu

TênMô tảKho lưu trữ
go-playground/validator/v10Trình xác thực dữ liệuhttps://github.com/go-playground/validator
go-cmpThư viện dùng để so sánh giá trị do Google mở nguồnhttps://github.com/google/go-cmp
ozzo-validationThư viện xác thực dữ liệu dựa trên quy tắchttps://github.com/go-ozzo/ozzo-validation
go-tagexprThư viện xác thực tag structhttps://github.com/bytedance/go-tagexpr

Cấu Trúc Dữ Liệu

TênMô tảKho lưu trữ
godsTriển khai các cấu trúc dữ liệu phổ biếnhttps://github.com/emirpasic/gods
go-datastructuresTriển khai các cấu trúc dữ liệu phổ biếnhttps://github.com/Workiva/go-datastructures
bisetTriển khai bitsets trong gohttps://github.com/bits-and-blooms/bitset
bloomTriển khai bloom filters trong gohttps://github.com/bits-and-blooms/bloom
dequeTriển khai hàng đợi hai đầu hiệu năng caohttps://github.com/edwingeng/deque
concurrent-mapTriển khai map phân mảnh an toàn cho đồng thờihttps://github.com/orcaman/concurrent-map
samber/loThư viện xử lý dữ liệu phong cách Lodash, hỗ trợ generichttps://github.com/samber/lo
google/btreeThư viện BTree do Google triển khai, hỗ trợ generichttps://github.com/google/btree
gostlThư viện cấu trúc dữ liệu giống C++STLhttps://github.com/liyue201/gostl

Tính Toán Toán Học

TênMô tảKho lưu trữ
gonumTương tự numpyhttps://github.com/gonum/gonum
decimalThư viện thao tác số dấu phẩy động độ chính xác caohttps://github.com/shopspring/decimal
crunchMột thư viện đơn giản hóa thao tác byte và bithttps://github.com/superwhiskers/crunch
math-engineThư viện engine phân tích và tính toán biểu thức toán họchttps://github.com/dengsgo/math-engine

Engine Mẫu

TênMô tảKho lưu trữ
pongo2Engine mẫu phong cách Djangohttps://github.com/flosch/pongo2
aceEngine mẫu htmlhttps://github.com/yosssi/ace
mustachemustache triển khai trong gohttps://github.com/hoisie/mustache
heroEngine mẫu mạnh mẽ và nhanhhttps://github.com/shiyanhui/hero
quicktemplateEngine mẫu hiệu năng cao như tên gọihttps://github.com/valyala/quicktemplate
amberEngine mẫu bắt nguồn từ HAML và Jadehttps://github.com/eknkc/amber

Thành Phần Cache

TênMô tảKho lưu trữ
golang-lruLRU an toàn cho luồng, và cache LRU 2Qhttps://github.com/hashicorp/golang-lru
ttlcacheCache dựa trên bộ nhớ, hỗ trợ TTL, generichttps://github.com/jellydator/ttlcache
gocacheTrình quản lý middleware cachehttps://github.com/eko/gocache
go-cacheCache dựa trên bộ nhớ, phù hợp cho ứng dụng đơn máy, hỗ trợ TTLhttps://github.com/patrickmn/go-cache
ristrettoCache bộ nhớ hiệu năng caohttps://github.com/dgraph-io/ristretto
bigcacheCache key lớn hiệu quả dựa trên bộ nhớhttps://github.com/allegro/bigcache

Cơ Sở Dữ Liệu & Driver

TênMô tảKho lưu trữ
modernc.org/sqliteDriver sqlite, viết thuần go, không cần cgohttps://gitlab.com/cznic/sqlite
mattn/go-sqlite3Driver sqlite, cần cgohttps://github.com/mattn/go-sqlite3
denisenkom/go-mssqldbDriver sqlserver, không còn cập nhật nhiều, khuyến nghị dùng phiên bản Microsofthttps://github.com/denisenkom/go-mssqldb
microsoft/go-mssqldbDriver sqlserver, nhánh mới do microsoft fork và bảo trìhttps://github.com/microsoft/go-mssqldb
pgxDriver postgreSQLhttps://github.com/jackc/pgx/
mysqlDriver mysqlhttps://github.com/go-sql-driver/mysql
oci-go-sdkDriver oracle chính thứchttps://github.com/oracle/oci-go-sdk
go-oraDriver oracle, viết thuần gohttps://github.com/sijms/go-ora
badgerCơ sở dữ liệu kv nhúng, dựa trên LSMhttps://github.com/dgraph-io/badger
boltdbCơ sở dữ liệu kv nhúng, dựa trên B+Treehttps://github.com/boltdb/bolt
goleveldbleveldb triển khai bằng ngôn ngữ gohttps://github.com/syndtr/goleveldb
qmgoThư viện thao tác mongodb do Qiniu Cloud mở nguồnhttps://github.com/qiniu/qmgo
mongo-go-driverDriver go chính thức của mongodbhttps://github.com/mongodb/mongo-go-driver
rqliteCơ sở dữ liệu quan hệ phân tán nhẹ dựa trên sqlitehttps://github.com/rqlite/rqlite/
go-mysqlMột bộ công cụ MySQL mạnh mẽhttps://github.com/go-mysql-org/go-mysql
go-mysql-elasticsearchCông cụ đồng bộ dữ liệu MySQL sang Elasticsearchhttps://github.com/go-mysql-org/go-mysql-elasticsearch
gofoundEngine tìm kiếm toàn văn đơn máy cấp độ trăm triệuhttps://github.com/sea-team/gofound
bleveThư viện tìm kiếm toàn vănhttps://github.com/blevesearch/bleve

Tuần Tự Hóa

TênMô tảKho lưu trữ
go-iniThư viện tuần tự hóa tệp inihttps://github.com/go-ini/ini
sonicThư viện tuần tự hóa json hiệu năng cao do ByteDance mở nguồnhttps://github.com/bytedance/sonic
easyjsonThư viện tuần tự hóa json nhanhhttps://github.com/mailru/easyjson
gjsonLấy nhanh giá trị key json, không phải thư viện tuần tự hóa truyền thốnghttps://github.com/tidwall/gjson
go-yamlThư viện tuần tự hóa yamlhttps://github.com/go-yaml/yaml
go-tomlThư viện tuần tự hóa tomlhttps://github.com/pelletier/go-toml
propertiesThư viện tuần tự hóa propertieshttps://github.com/magiconair/properties
viperHỗ trợ tuần tự hóa nhiều định dạng dữ liệu, đồng thời cũng là trình quản lý cấu hìnhhttps://github.com/spf13/viper
configorBộ tuần tự hóa nhiều định dạng dữ liệu do tác giả gorm viết, trình quản lý cấu hìnhhttps://github.com/jinzhu/configor

Dòng Lệnh

TênMô tảKho lưu trữ
pflagGói flag phong cách POSIX/GUNhttps://github.com/spf13/pflag
go-flagsTrình phân tích cú pháp tham số lệnhhttps://github.com/jessevdk/go-flags
cobraGiàn giáo xây dựng chương trình dòng lệnh hiện đạihttps://github.com/spf13/cobra
dimiro1/bannerThư viện xây dựng banner đẹphttps://github.com/dimiro1/banner
go-prettyXuất bảng dòng lệnh, văn bản, thanh tiến độ đẹphttps://github.com/jedib0t/go-pretty
progressbarThanh tiến độ dòng lệnh an toàn cho luồnghttps://github.com/schollz/progressbar
go-ansiTiện ích chuỗi thoát ANSI di động cho Windows cho ngôn ngữ Gohttps://github.com/k0kubun/go-ansi
go-isattyThư viện dùng để判断 ttyhttps://github.com/mattn/go-isatty

Nén và Giải Nén

TênMô tảKho lưu trữ
klauspost/compressTối ưu hóa và cải tiến thư viện chuẩn compresshttps://github.com/klauspost/compress
alexmullins/zipNhánh fork của thư viện chuẩn archive/zip, hỗ trợ mật khẩuhttps://github.com/alexmullins/zip
mholt/archiverThư viện công cụ nén và giải nén hỗ trợ nhiều định dạng (cá nhân rất khuyến nghị)https://github.com/mholt/archiver
go-carTriển khai tệp lưu trữ CAR trong gohttps://github.com/ipld/go-car
go-unarrMột thư viện nén và giải nénhttps://github.com/gen2brain/go-unarr
xzThư viện Golang thuần để đọc và ghi tệp nén xzhttps://github.com/ulikunitz/xz

Thời Gian Ngày Tháng

TênMô tảKho lưu trữ
carbonThư viện xử lý thời gian ngày thánghttps://github.com/golang-module/carbon
robfig/cronThư viện tác vụ định kỳhttps://pkg.go.dev/github.com/robfig/cron/v3
gronThư viện tác vụ định kỳhttps://github.com/roylee0704/gron
jobrunnerFramework tác vụ định kỳ bất đồng bộhttps://github.com/bamzi/jobrunner
dateparseCó thể phân tích cú pháp chuỗi thời gian khi không biết định dạnghttps://github.com/araddon/dateparse
jinzhu/nowThư viện công cụ ngày thánghttps://github.com/jinzhu/now

Inject Phụ Thuộc

TênMô tảKho lưu trữ
digThư viện inject phụ thuộc do uber mở nguồn, dựa trên reflectionhttps://darjun.github.io/2020/02/22/godailylib/dig/
wireThư viện inject phụ thuộc do Google mở nguồn, dựa trên tạo mãhttps://github.com/google/wire
injectCông cụ inject phụ thuộchttps://github.com/codegangsta/inject
diContainer inject phụ thuộchttps://github.com/sarulabs/di

Vị Trí Địa Lý

TênMô tảKho lưu trữ
geoip2-golangChuyển IP sang thông tin địa lýhttps://github.com/oschwald/geoip2-golang
ip2location-goChuyển IP sang thông tin địa lýhttps://github.com/ip2location/ip2location-go

Framework Crawler

TênMô tảKho lưu trữ
collyFramework crawler đơn giản và mạnh mẽhttps://github.com/gocolly/colly
goqueryTương tự jQueryhttps://github.com/PuerkitoBio/goquery

Công Cụ Mạng

TênMô tảKho lưu trữ
gentlemanClient http điều khiển bằng plugin, có thể mở rộnghttps://github.com/h2non/gentleman
restyClient http restfulhttps://pkg.go.dev/github.com/go-resty/resty/v2
gopeedTrình quản lý tải xuống hiện đại hỗ trợ tất cả nền tảng, dựa trên go và flutterhttps://github.com/GopeedLab/gopeed

Email

TênMô tảKho lưu trữ
jordan-wright/emailThư viện gửi mail mạnh mẽ và linh hoạthttps://github.com/jordan-wright/email
gomailThư viện gửi mailhttps://github.com/go-gomail/gomail
go-simple-mailThư viện gửi mail đơn giảnhttps://github.com/xhit/go-simple-mail
go-mailThư viện gửi mail dễ sử dụng và toàn diệnhttps://github.com/wneessen/go-mail
email-verifierXác thực email có hợp lệ không, không cần gửi mailhttps://github.com/AfterShip/email-verifier
maddyMáy chủ mail mô-đunhttps://github.com/foxcpp/maddy
moxMáy chủ mail tự lưu trữ, mã nguồn mở toàn diện, bảo trì caohttps://github.com/mjl-/mox
hermesThư viện tạo mẫu emailhttps://github.com/matcornic/hermes
listmonkQuản lý danh sách mail hiệu năng cao, tự lưu trữ, trực quan hóahttps://github.com/knadh/listmonk
go-smtpClient và Server SMTP viết bằng gohttps://github.com/emersion/go-smtp
go-imapClient và Server IMAP viết bằng gohttps://github.com/emersion/go-imap

Phát Triển Game

TênMô tảKho lưu trữ
ebitengineMột engine game 2d cực kỳ đơn giảnhttps://github.com/hajimehoshi/ebiten
Azul3DMột engine game 3d viết bằng gohttps://github.com/azul3d/engine
engoEngine game 2d mã nguồn mở viết bằng gohttps://github.com/EngoEngine/engo
g3n/engineEngine game 3d gohttps://github.com/g3n/engine
gonetMột framework server gamehttps://github.com/xtaci/gonet
leafFramework server gamehttps://github.com/name5566/leaf
cloud-gameDịch vụ cloud game dựa trên webhttps://github.com/giongto35/cloud-game

GUI

TênMô tảKho lưu trữ
fyneBộ công cụ phát triển GUI đa nền tảng (thực sự có gì đó)https://github.com/fyne-io/fyne
go-flutterViết flutter bằng gohttps://github.com/go-flutter-desktop/go-flutter
WailsCó thể xem nó như một替代品 Electron nhanh và nhẹ cho Gohttps://github.com/wailsapp/wails

Tương Tác Hệ Thống

TênMô tảKho lưu trữ
gopsutilLấy thông tin hệ điều hành, tương thích các hệ thống chínhhttps://github.com/shirou/gopsutil
flockKhóa tệp dựa trên gọi hệ điều hànhhttps://github.com/gofrs/flock
sysThư viện tương tác hệ điều hành chính thứchttps://cs.opensource.google/go/x/sys

Tương Tác Đa Ngôn Ngữ

TênMô tảKho lưu trữ
gopher-luaMáy ảo lua viết bằng gohttps://github.com/yuin/gopher-lua
go-luaMáy ảo lua viết bằng gohttps://github.com/Shopify/go-lua
gojaHỗ trợ es5.1+https://github.com/dop251/goja
tengoTengo là một ngôn ngữ script Go nhỏ, động, nhanh, an toànhttps://github.com/d5/tengo
gobyMột ngôn ngữ script thông dịch được truyền cảm hứng từ ruby, triển khai bằng gohttps://github.com/goby-lang/goby
go+Ngôn ngữ script do Qiniu Cloud mở nguồn, có thể tương tác liền mạch với go, còn gọi là ngôn ngữ Qhttps://github.com/goplus/gop
go-pythongo gọi cpython2https://github.com/sbinet/go-python
go-python3go gọi cpython3https://github.com/DataDog/go-python3

Xử Lý Hình Ảnh

TênMô tảKho lưu trữ
plotMột thư viện vẽ, thường dùng cho trực quan hóa dữ liệuhttps://github.com/gonum/plot
ggThư viện vẽ 2dhttps://github.com/fogleman/gg
gocvHỗ trợ opencv4+https://github.com/hybridgroup/gocv
imagingMột thư viện xử lý hình ảnh đơn giảnhttps://github.com/disintegration/imaging

Xử Lý Văn Bản

TênMô tảKho lưu trữ
valeCông cụ hiệu đính văn bản nhận thức cú pháphttps://github.com/errata-ai/vale

Xác Thực Ủy Quyền

TênMô tảKho lưu trữ
casbinThư viện quản lý quyền linh hoạt và mạnh mẽhttps://github.com/casbin/casbin
openfgaThư viện quyền/ủy quyền hiệu năng cao, bắt nguồn từ Google Zanzibarhttps://github.com/openfga/openfga

Tạo Mã

TênMô tảKho lưu trữ
jenniferThư viện tạo mãhttps://github.com/dave/jennifer

Xử Lý Biểu Thức Chính Quy

TênMô tảKho lưu trữ
commonregxMột thư viện thu thập các biểu thức chính quy thường dùnghttps://github.com/mingrammer/commonregex

Xử Lý Tệp

TênMô tảKho lưu trữ
fileboxThư viện công cụ thao tác tệphttps://github.com/dstgo/filebox
sizeHoàn thành nhanh chuyển đổi giữa kích thước tệp và chuỗihttps://github.com/dstgo/size
checksumMột thư viện tính toán chữ ký hash tệphttps://github.com/codingsince1985/checksum
pdfcpuBộ xử lý pdfhttps://github.com/pdfcpu/pdfcpu
uniofficeThư viện xử lý officehttps://github.com/unidoc/unioffice
gooxmlThư viện xử lý officehttps://github.com/carmel/gooxml
excelizeThư viện xử lý Excelhttps://github.com/360EntSecGroup-Skylar/excelize

Công Cụ Chung

TênMô tảKho lưu trữ
lancetThư viện công cụ đa năng, tương tự gói common trong javahttps://github.com/duke-git/lancet
bytebufferpoolBể đệm bytehttps://github.com/valyala/bytebufferpool

Framework Phát Triển

TênMô tảKho lưu trữ
goframeFramework phát triển go doanh nghiệp hiện đạihttps://github.com/gogf/gf

Thỏa Thuận Đồng Thuận

TênMô tảKho lưu trữ
hashicorp/raftThư viện raft do consul mở nguồnhttps://github.com/hashicorp/raft
hashicorp/memberlistThư viện gossip do consul mở nguồnhttps://github.com/hashicorp/memberlist
etcd-io/raftThư viện raft do etcd mở nguồnhttps://github.com/etcd-io/raft

OCR

TênMô tảKho lưu trữ
gosseractThư viện OCR sử dụng thư viện Tesseract C++https://github.com/otiai10/gosseract

Golang by www.golangdev.cn edit