12 var PathListSeparator = os.PathListSeparator
15 if PathListSeparator == 0 {
17 PathListSeparator = '!'
21 // PathList is a list of paths. Paths are assuemd to be separated by
22 // os.PathListSeparator ('!' if undefined.)
24 // White spaces are valid within terms, but leading and trailing whitespace
25 // are discarded from the whole input, not from terms!
26 type PathListOption struct {
32 func NewPathListOption(defaultValue []string) ConfigNode {
33 opt := new(PathListOption)
35 opt.defaultvalue = defaultValue
41 func (opt *PathListOption) String() string {
42 return strings.Join(opt.Values, string(PathListSeparator))
45 func (opt *PathListOption) Parse(newValue string) os.Error {
46 newValue = strings.TrimSpace(newValue)
48 opt.Values = strings.Split(newValue, string(PathListSeparator))
54 func (opt *PathListOption) IsDefault() bool {
58 func (opt *PathListOption) Reset() {
59 opt.Values = opt.defaultvalue