diff --git a/docs/2022-07-10-bootstrap-go.html b/docs/2022-07-10-bootstrap-go.html index 9adb95d..f766695 100644 --- a/docs/2022-07-10-bootstrap-go.html +++ b/docs/2022-07-10-bootstrap-go.html @@ -90,7 +90,7 @@ const ( # Run inside directory which contains Drink stringer -type=Drink -

Replace go fmt, goimports with mvdan/gofumpt.

gofumpt provides more rules when format Go codes.

Use golangci/golangci-lint.

No need to say more.
Lint or get the f out!

If you get fieldalignment error, use fieldalignment to fix them.

# Install
+

Don't waste your time rewrite rate limiter if your use case is simple, use rate or go-redis/redis_rate

rate if you want rate limiter locally in your single instance of service.
redis_rate if you want rate limiter distributed across all your instances of service.

Replace go fmt, goimports with mvdan/gofumpt.

gofumpt provides more rules when format Go codes.

Use golangci/golangci-lint.

No need to say more.
Lint or get the f out!

If you get fieldalignment error, use fieldalignment to fix them.

# Install
 go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
 
 # Fix
diff --git a/posts/2022-07-10-bootstrap-go.md b/posts/2022-07-10-bootstrap-go.md
index bdf2dd8..f7efcfb 100644
--- a/posts/2022-07-10-bootstrap-go.md
+++ b/posts/2022-07-10-bootstrap-go.md
@@ -287,6 +287,11 @@ go install golang.org/x/tools/cmd/stringer@latest
 stringer -type=Drink
 ```
 
+### Don't waste your time rewrite rate limiter if your use case is simple, use [rate](https://pkg.go.dev/golang.org/x/time/rate) or [go-redis/redis_rate](https://github.com/go-redis/redis_rate)
+
+rate if you want rate limiter locally in your single instance of service.
+redis_rate if you want rate limiter distributed across all your instances of service.
+
 ### Replace `go fmt`, `goimports` with [mvdan/gofumpt](https://github.com/mvdan/gofumpt).
 
 `gofumpt` provides more rules when format Go codes.