Skip to content

Instantly share code, notes, and snippets.

@jameinel
Created August 7, 2014 15:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jameinel/d0763eb6d8d38cfd64e1 to your computer and use it in GitHub Desktop.
Save jameinel/d0763eb6d8d38cfd64e1 to your computer and use it in GitHub Desktop.

You can run this with: go build -flags chaos and go build

And then run it (./chaostest)

// +build chaos
package main
var chaos = true
package main
import (
"fmt"
)
func main() {
fmt.Printf("Chaos: %t\n", chaos)
}
// +build !chaos
package main
var chaos = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment