fix: format all Go files with gofmt
- Fix alignment in struct fields (sessionProfileResponse, textureInfo, Handler) - Align struct field values in internal/templates/templates.go, internal/api/api.go
This commit is contained in:
@@ -71,9 +71,9 @@ func (w *statusWriter) WriteHeader(status int) {
|
||||
type RateLimiter struct {
|
||||
mu sync.Mutex
|
||||
clients map[string]*bucket
|
||||
rate int // tokens per interval
|
||||
rate int // tokens per interval
|
||||
interval time.Duration
|
||||
burst int // max bucket size
|
||||
burst int // max bucket size
|
||||
}
|
||||
|
||||
type bucket struct {
|
||||
@@ -85,10 +85,10 @@ type bucket struct {
|
||||
// with a maximum burst of `burst`.
|
||||
func NewRateLimiter(rate int, interval time.Duration, burst int) *RateLimiter {
|
||||
rl := &RateLimiter{
|
||||
clients: make(map[string]*bucket),
|
||||
rate: rate,
|
||||
clients: make(map[string]*bucket),
|
||||
rate: rate,
|
||||
interval: interval,
|
||||
burst: burst,
|
||||
burst: burst,
|
||||
}
|
||||
// Periodically clean up stale entries.
|
||||
go rl.cleanup()
|
||||
|
||||
Reference in New Issue
Block a user