diff --git a/pkg/cmd/api/api.go b/pkg/cmd/api/api.go index ac49d715b..7d7f23a92 100644 --- a/pkg/cmd/api/api.go +++ b/pkg/cmd/api/api.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "io/ioutil" - "math" "net/http" "os" "regexp" @@ -25,7 +24,6 @@ import ( "github.com/cli/cli/pkg/cmdutil" "github.com/cli/cli/pkg/iostreams" "github.com/cli/cli/pkg/jsoncolor" - "github.com/mgutz/ansi" "github.com/spf13/cobra" ) @@ -98,6 +96,17 @@ func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command there are no more pages of results. For GraphQL requests, this requires that the original query accepts an %[1]s$endCursor: String%[1]s variable and that it fetches the %[1]spageInfo{ hasNextPage, endCursor }%[1]s set of fields from a collection. + + With %[1]s--template%[1]s, the provided Go template is rendered using the JSON data as input. + For the syntax of Go templates, see: https://golang.org/pkg/text/template/ + + The following functions are available in templates: + - %[1]scolor