github.com/go-chef/chef@v0.30.1/testapi/stats.go (about) 1 // Test the go-chef/chef chef server api /stats endpoint against a live server 2 package testapi 3 4 import ( 5 "fmt" 6 "os" 7 ) 8 9 // stats exercise the chef server api 10 func Stats() { 11 // Create a client for access 12 client := Client(nil) 13 password := os.Args[6] 14 15 stats, err := client.Stats.Get("statsuser", password) 16 if err != nil { 17 fmt.Println("Issue getting stats information", err) 18 } 19 fmt.Printf("List stats json format: %+v", stats) 20 }