example_test.go 652 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2012 Numerotron Inc.
  2. // Use of this source code is governed by an MIT-style license
  3. // that can be found in the LICENSE file.
  4. package stathat_test
  5. import (
  6. "log"
  7. stathat "github.com/stathat/go"
  8. )
  9. func ExamplePostEZCountOne() {
  10. log.Printf("starting example")
  11. stathat.Verbose = true
  12. err := stathat.PostEZCountOne("go example test run", "[email protected]")
  13. if err != nil {
  14. log.Printf("error posting ez count one: %v", err)
  15. return
  16. }
  17. // If using this with a valid account, this could be helpful in a short script:
  18. /*
  19. ok := stathat.WaitUntilFinished(5 * time.Second)
  20. if ok {
  21. fmt.Println("ok")
  22. }
  23. */
  24. // Output:
  25. }