Procházet zdrojové kódy

Satisfy linters

tags/0.10
9seconds před 8 roky
rodič
revize
31f71b0e12
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1
    3
      config/config.go

+ 1
- 3
config/config.go Zobrazit soubor

@@ -91,9 +91,7 @@ func NewConfig(debug, verbose bool, // nolint: gocyclo
91 91
 	publicIPv6 net.IP, publicIPv6Port uint16,
92 92
 	statsIP net.IP, statsPort uint16,
93 93
 	secret, adtag string) (*Config, error) {
94
-	if strings.HasPrefix(secret, "dd") {
95
-		secret = secret[2:]
96
-	}
94
+	secret = strings.TrimPrefix(secret, "dd")
97 95
 	if len(secret) != 32 {
98 96
 		return nil, errors.New("Telegram demands secret of length 32")
99 97
 	}

Načítá se…
Zrušit
Uložit