cli

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: MIT Imports: 85 Imported by: 0

Documentation

Overview

Package cli wires the cobra command tree for roksbnkctl.

Build-time variables (Version, Commit, BuildDate) are populated via -ldflags by goreleaser / Makefile.

Index

Constants

View Source
const DocsURL = "https://jgruberf5.github.io/roksbnkctl/book/"

DocsURL is the canonical user documentation surface for roksbnkctl — the published mdBook at GitHub Pages. Single source of truth so the `version` subcommand, the cobra-wired `--version` flag, and the `self update` flow all surface the same URL.

Variables

View Source
var (
	Version   = "dev"
	Commit    = "none"
	BuildDate = "unknown"
)

Build metadata, populated via -ldflags at link time.

Functions

func Execute

func Execute()

Execute runs the root command. Wires SIGINT (Ctrl+C) to a cancellable context so long-running operations like terraform apply terminate promptly and child processes get cleaned up.

Loads $PWD/.env at startup if present — godotenv's Load does NOT overwrite existing env vars, so anything already in the shell wins. Lets users keep IBMCLOUD_API_KEY, GITHUB_TOKEN, TF_VAR_* etc. in a project-scoped file instead of shell profiles.

func RootCommand added in v1.0.0

func RootCommand() *cobra.Command

RootCommand returns the wired-up root cobra command for tooling that needs to walk the command tree (e.g. the cobra-to-markdown reference generator under tools/refgen/cobra-md). Subcommands are registered via package-level init() funcs, so the tree is fully assembled before any caller imports this package.

Callers MUST NOT mutate the returned command — it's the same instance Execute() runs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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