LoginSignup
0
1

More than 3 years have passed since last update.

Goスタック模索メモ

Last updated at Posted at 2019-06-07

HTTP Server

Router

gorilla/mux: A powerful URL router and dispatcher for golang.
https://github.com/gorilla/mux

定番。薄い。

go-chi/chi: lightweight, idiomatic and composable router for building Go HTTP services
https://github.com/go-chi/chi

薄い。gorilla/muxよりAPIが直感的。

JSON Request

小さいので自前で書く人が多いっぽい

以下などに薄い実装

render/decoder.go at master · go-chi/render
https://github.com/go-chi/render/blob/master/decoder.go

Render

unrolled/render: Go package for easily rendering JSON, XML, binary data, and HTML templates responses.
https://github.com/unrolled/render

人気っぽい

Job Queue

RichardKnop/machinery: Machinery is an asynchronous task queue/job queue based on distributed message passing.
https://github.com/RichardKnop/machinery

Broker、ストアそれぞれのバックエンドがいろいろ対応してる(ex. AMQP, Redis, SQS, GCP Pub/Sub, Memcache, MongoDB)
DelayもRetryも対応してる

gocraft/work: Process background jobs in Go
https://github.com/gocraft/work

Redisバックエンド。Delayも対応してる。

RDBMS

jinzhu/gorm: The fantastic ORM library for Golang, aims to be developer friendly
https://github.com/jinzhu/gorm

人気。ORM。

go-gorp/gorp: Go Relational Persistence - an ORM-ish library for Go
https://github.com/go-gorp/gorp

人気。Select文は自分でSQL書いてstructへのマッピングはやってくれる。
クエリをコントロールしたい場合によさそう。

Development

oxequa/realize: Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
https://github.com/oxequa/realize

ホットリロード
go mod使ってる & cmdディレクトリにmainがあるときに相対モジュールが解決できないエラーが起きる(条件は合っていないかも)が、以下にある設定で一応解決する。

Realize が Go 1.11 の Modules で使えない - Qiita
https://qiita.com/enta0701/items/0d0592abb18a333b3268

その他

rakyll/statik: Embed files into a Go executable
https://github.com/rakyll/statik

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1