コード例 #1
0
ファイル: log_test.go プロジェクト: opinionated/utils
func TestInitStd(t *testing.T) {
	log.InitStd()
	log.Info("hello world", "from", "info")
	log.Infof("one is: %d", 1)
	log.Info("two")
	log.Infof("three is: %d", 3)
}
コード例 #2
0
ファイル: main.go プロジェクト: opinionated/scrapeClient
func main() {
	// initialize logs to write to standard out
	log.InitStd()

	// see doc for server's IP, we don't want to upload it
	// TODO: store things like IP in hidden config files
	c := client.Client{IP: "http://107.170.148.224:8080/"}

	c.Run()
}
コード例 #3
0
func TestMain(m *testing.M) {
	flag.Parse()
	log.InitStd()
	os.Exit(m.Run())
}