Documentation
¶
Index ¶
- Variables
- func LineIsAComment(s string) bool
- func ParseBool(s string) (bool, error)
- func SplitSettingsLine(s string) (key, value string, err error)
- type KeyValuePair
- type Settings
- func (s *Settings) Get(key string) string
- func (s *Settings) GetSlice(keys []string) []string
- func (s *Settings) Set(key, value string) bool
- func (s *Settings) SetFilename(filename string) (changed bool)
- func (s *Settings) SetLogUpdates(value bool) (changed bool)
- func (s *Settings) SetSlice(keyValuePairs []KeyValuePair[string, string]) []bool
- func (s *Settings) Update() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultShallLogUpdates = true DefaultSettingsFilename = "goapi.settings" TheSettings = New(DefaultSettingsFilename, DefaultShallLogUpdates) UpdatePace = time.Second SettingsKeyValueDelimiters = "=:" )
View Source
var (
ErrNoValidDelimiterFound = errors.New("no valid key value delimiter found")
)
Functions ¶
func LineIsAComment ¶
func SplitSettingsLine ¶
Types ¶
type KeyValuePair ¶
type KeyValuePair[K constraints.Ordered, V any] struct { Key K Value V }
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
func NewWithContext ¶
func (*Settings) SetFilename ¶
func (*Settings) SetLogUpdates ¶
Click to show internal directories.
Click to hide internal directories.