15 lines
316 B

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