Skip to content

Commit a23c1cd

Browse files
committed
chore: fix lint
1 parent fd51e8e commit a23c1cd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/config/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ func GetString(viperkey string, env string, defaultVal string) string {
4949
// GetInt get integer value in the viper and environment variable with default value
5050
func GetInt(viperkey string, env string, defaultVal int) int {
5151
if value := viper.Get(viperkey); value != nil {
52-
switch value.(type) {
52+
switch value := value.(type) {
5353
case string:
54-
if v, err := strconv.Atoi(value.(string)); err == nil {
54+
if v, err := strconv.Atoi(value); err == nil {
5555
return v
5656
}
5757
case int:
58-
return value.(int)
58+
return value
5959
}
6060
}
6161

0 commit comments

Comments
 (0)