You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
554 B
Go

/*
* Copyright (C) 2019 Philipp Haefelfinger (http://www.haefelfinger.ch/). All Rights Reserved.
* This application is licensed under GPLv2. See the LICENSE file in the root directory of the project.
*/
package app
import "strings"
type arrayFlags []string
func (arr *arrayFlags) String() string {
b := strings.Builder{}
for _, v := range *arr {
if b.Len() > 0 {
b.WriteString(",")
}
b.WriteString(v)
}
return b.String()
}
func (arr *arrayFlags) Set(value string) error {
*arr = append(*arr, strings.TrimSpace(value))
return nil
}