Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
Config *config.Config
GitRepository *git.Repository
GraphQLClient graphql.Client
RestAPIClient *buildkite.Client
Version string
SkipConfirm bool
NoInput bool
}
func (*Factory) SetGlobalFlags ¶ added in v3.14.2
SetGlobalFlags reads the global persistent flags and sets them on the factory. This should be called in PreRunE of commands that need to use global flags. It's safe to call multiple times and will only set flags if they're present.
NOTE: Due to Cobra limitations, global flags must be positioned AFTER at least one subcommand. Valid: bk job --yes cancel <id> or bk job cancel --yes <id> Invalid: bk --yes job cancel <id>
Once the CLI is fully migrated to Kong (currently in progress), the limitation will be removed and global flags will work in any position, including: bk --yes job cancel <id>
Click to show internal directories.
Click to hide internal directories.