github.com/go-chef/chef@v0.30.1/testapi/required_recipe.go (about)

     1  // Test the go-chef/chef chef server api /required_recipe endpoint against a live server
     2  package testapi
     3  
     4  import (
     5  	"fmt"
     6  )
     7  
     8  // required_recipe exercise the chef server api
     9  func RequiredRecipe() {
    10  	// Create a client for access
    11  	client := Client(nil)
    12  
    13  	required_recipe, err := client.RequiredRecipe.Get()
    14  	if err != nil {
    15  		fmt.Println("Issue getting required_recipe information", err)
    16  	}
    17  	fmt.Printf("List required_recipe: %+v", required_recipe)
    18  }