Documentation ¶
Overview ¶
Copyright 2015 by Leipzig University Library, http://ub.uni-leipzig.de by The Finc Authors, http://finc.info by Martin Czygan, <martin.czygan@uni-leipzig.de>
This file is part of some open source application.
Some open source application is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Some open source application is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>.
@license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+>
Package sets implements basic set types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StringMap ¶
StringMap provides defaults for string map lookups with defaults.
func (StringMap) LookupDefault ¶
LookupDefault map with a default value.
func (StringMap) UnmarshalJSON ¶
type StringSet ¶
type StringSet struct {
// contains filtered or unexported fields
}
StringSet is map disguised as set.
func NewStringSet ¶
NewString returns an empty string set.
func (*StringSet) Add ¶
Add adds a string to a set, returns true if added, false it it already existed (noop).
func (*StringSet) SortedValues ¶
Values returns the set values as a string slice.
type StringSlice ¶
type StringSlice []string
Define a type named "StringSlice" as a slice of strings. Useful for repeated command line flags.
func (*StringSlice) Set ¶
func (i *StringSlice) Set(value string) error
The second method is Set(value string) error
func (*StringSlice) String ¶
func (i *StringSlice) String() string
Now, for our new type, implement the two methods of the flag.Value interface... The first method is String() string
type StringSliceMap ¶
StringMap provides defaults for string map lookups.
func (StringSliceMap) LookupDefault ¶
func (m StringSliceMap) LookupDefault(key string, def []string) []string
LookupDefault with default value.