You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
316 B
14 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 |
|
}
|
|
|