Documentation
¶
Index ¶
Examples ¶
Constants ¶
View Source
const ( ToggleableExistsError = err.Error("toggleable already exists") NotEnoughOptionsError = err.Error("toggleables need at least 2 options to toggle") ToggleableNotFoundError = err.Error("toggleable does not exist") InvalidToggleError = err.Error("toggle value is out of bounds for the toggleable") )
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Example ¶
os.Args = []string{"app", "-TExampleRun", "1"} env.Load() // For testing purposes the environment has to be reloaded after updating the cml arguments _ = Add("ExampleRun", func() error { fmt.Println("1") return nil }, func() error { fmt.Println("2") return nil }) _ = Execute("ExampleRun") _ = Toggle("ExampleRun", 0) _ = Execute("ExampleRun") _ = Run("ExampleRun", func() error { fmt.Println("2") return nil }, func() error { fmt.Println("1") return nil })
Output: 2 1 2
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.