cmdutil

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCustomFieldsFlag

func AddCustomFieldsFlag(cmds ...*cobra.Command)

AddCustomFieldsFlag registers the standard --custom-fields-json flag.

func AddListFlags

func AddListFlags(cmd *cobra.Command)

AddListFlags adds common pagination/sorting flags to a command.

func CheckErr

func CheckErr(httpResp *http.Response, body []byte) error

CheckErr checks an HTTP response for errors using the body bytes.

func Ctx

func Ctx() context.Context

Ctx returns a background context.

func IntPtr

func IntPtr(i int) *int

IntPtr returns a pointer to an int, or nil if zero.

func NewClient

func NewClient() (*client.ClientWithResponses, config.Config, error)

NewClient creates an API client from current config, validating that token is set.

func NewClientWithAuth

func NewClientWithAuth() (*client.ClientWithResponses, config.Config, error)

NewClientWithAuth creates an API client and requires a token.

func ParseCustomFields

func ParseCustomFields(cmd *cobra.Command) (*map[string]client.CustomFieldModel, error)

func StringPtr

func StringPtr(s string) *string

StringPtr returns a pointer to a string, or nil if empty.

func StringSlicePtr

func StringSlicePtr(s string) *[]string

StringSlicePtr returns a pointer to a string slice parsed from comma-separated input, or nil if empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL