prosper/flags.go

15 lines
316 B
Go

package main
// Flags is a simple map of strings to boolean flag fields
type Flags map[string]bool
// GetFlag returns a boolean for the given flag
func (f Flags) GetFlag(s string) bool {
return f[s]
}
// SetFlag overwrites the existing boolean for the flag
func (f Flags) SetFlag(s string, b bool) {
f[s] = b
}