File tree 2 files changed +1
-6
lines changed
2 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ type Config struct {
10
10
Disabled bool `toml:"disabled"` // default: false
11
11
12
12
WindowLength time.Duration `toml:"window_length"` // default: 1m
13
- ClientName string `toml:"client_name"` // default: os.Args[0]
13
+ ClientName string `toml:"client_name"` // default: ""
14
14
PrefixKey string `toml:"prefix_key"` // default: "httprate"
15
15
16
16
// OnError lets you subscribe to all runtime Redis errors. Useful for logging/debugging.
Original file line number Diff line number Diff line change @@ -3,8 +3,6 @@ package httprateredis
3
3
import (
4
4
"context"
5
5
"fmt"
6
- "os"
7
- "path/filepath"
8
6
"strconv"
9
7
"sync/atomic"
10
8
"time"
@@ -38,9 +36,6 @@ func NewCounter(cfg *Config) *redisCounter {
38
36
if cfg .Port < 1 {
39
37
cfg .Port = 6379
40
38
}
41
- if cfg .ClientName == "" {
42
- cfg .ClientName = filepath .Base (os .Args [0 ])
43
- }
44
39
if cfg .PrefixKey == "" {
45
40
cfg .PrefixKey = "httprate"
46
41
}
You can’t perform that action at this time.
0 commit comments