@@ -137,8 +137,8 @@ const (
137137 PanicOnError
138138)
139139
140- // ParseErrorsWhitelist defines the parsing errors that can be ignored
141- type ParseErrorsWhitelist struct {
140+ // ParseErrorsAllowlist defines the parsing errors that can be ignored
141+ type ParseErrorsAllowlist struct {
142142 // UnknownFlags will ignore unknown flags errors and continue parsing rest of the flags
143143 UnknownFlags bool
144144}
@@ -158,8 +158,8 @@ type FlagSet struct {
158158 // help/usage messages.
159159 SortFlags bool
160160
161- // ParseErrorsWhitelist is used to configure a whitelist of errors
162- ParseErrorsWhitelist ParseErrorsWhitelist
161+ // ParseErrorsAllowlist is used to configure an allowlist of errors
162+ ParseErrorsAllowlist ParseErrorsAllowlist
163163
164164 name string
165165 parsed bool
@@ -984,7 +984,7 @@ func (f *FlagSet) parseLongArg(s string, args []string, fn parseFunc) (a []strin
984984 case name == "help" :
985985 f .usage ()
986986 return a , ErrHelp
987- case f .ParseErrorsWhitelist .UnknownFlags :
987+ case f .ParseErrorsAllowlist .UnknownFlags :
988988 // --unknown=unknownval arg ...
989989 // we do not want to lose arg in this case
990990 if len (split ) >= 2 {
@@ -1042,7 +1042,7 @@ func (f *FlagSet) parseSingleShortArg(shorthands string, args []string, fn parse
10421042 f .usage ()
10431043 err = ErrHelp
10441044 return
1045- case f .ParseErrorsWhitelist .UnknownFlags :
1045+ case f .ParseErrorsAllowlist .UnknownFlags :
10461046 // '-f=arg arg ...'
10471047 // we do not want to lose arg in this case
10481048 if len (shorthands ) > 2 && shorthands [1 ] == '=' {
0 commit comments