File: example_test.go

package info (click to toggle)
golang-github-stathat-go 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 96 kB
  • sloc: makefile: 2
file content (29 lines) | stat: -rw-r--r-- 652 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (C) 2012 Numerotron Inc.
// Use of this source code is governed by an MIT-style license
// that can be found in the LICENSE file.

package stathat_test

import (
	"log"

	stathat "github.com/stathat/go"
)

func ExamplePostEZCountOne() {
	log.Printf("starting example")
	stathat.Verbose = true
	err := stathat.PostEZCountOne("go example test run", "nobody@stathat.com")
	if err != nil {
		log.Printf("error posting ez count one: %v", err)
		return
	}
	// If using this with a valid account, this could be helpful in a short script:
	/*
		ok := stathat.WaitUntilFinished(5 * time.Second)
		if ok {
			fmt.Println("ok")
		}
	*/
	// Output:
}