Browse Source

fix Set method to interpret the flag `-no-these-arrays` and delete

unused flag type
content-update
Augusto 4 years ago committed by xpetit
parent
commit
094c520261
  1. 18
      go/tests/rc/rc.go

18
go/tests/rc/rc.go

@ -29,28 +29,13 @@ func (a *strBoolMap) Set(str string) error {
if *a == nil {
*a = make(map[string]bool)
}
s := strings.Split(str, " ")
s := strings.Split(str, ",")
for _, v := range s {
(*a)[v] = true
}
return nil
}
type arrFlag struct {
active bool
content []string
}
func (a *arrFlag) String() string {
return strings.Join(a.content, " ")
}
func (a *arrFlag) Set(s string) error {
a.active = true
a.content = strings.Split(s, ",")
return nil
}
// flag that groups a boolean value and a regular expression
type regexpFlag struct {
active bool
@ -641,7 +626,6 @@ func main() {
info.illegals = append(info.illegals, il)
}
}
for _, v := range info.arrays {
if noArrays || noTheseArrays[v.name] {
il := &illegal{

Loading…
Cancel
Save