Skip to content

Commit 46be563

Browse files
renamed all constant
1 parent 2af6e03 commit 46be563

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmdutils/switches/switches.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
)
2626

2727
const (
28-
DefaultValue = "*"
28+
All = "*"
2929

3030
disablePrefix = "-"
3131
)
@@ -70,7 +70,7 @@ func (s *Switches) Set(val string) error {
7070
// Validate that all specified controllers are known
7171
for _, v := range settings {
7272
trimmed := strings.TrimPrefix(v, disablePrefix)
73-
if _, ok := s.settings[trimmed]; trimmed != DefaultValue && !ok {
73+
if _, ok := s.settings[trimmed]; trimmed != All && !ok {
7474
return fmt.Errorf("unknown item: %s", trimmed)
7575
}
7676
}
@@ -120,7 +120,7 @@ func (s *Switches) setSettings(settings []string) {
120120

121121
var isDefault bool
122122
for _, v := range settings {
123-
if v == DefaultValue {
123+
if v == All {
124124
isDefault = true
125125
break
126126
}
@@ -133,7 +133,7 @@ func (s *Switches) setSettings(settings []string) {
133133
}
134134

135135
for _, v := range settings {
136-
if v == DefaultValue {
136+
if v == All {
137137
continue
138138
}
139139
s.settings[strings.TrimPrefix(v, disablePrefix)] = !strings.HasPrefix(v, disablePrefix)

0 commit comments

Comments
 (0)