experimental

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package experimental gates the visibility of experimental CLI commands.

Experimental commands stay fully runnable in every build; this package only controls whether they appear in `entire help`. Developer builds (go build, go run, mise) show them, grouped under an "Experimental commands:" help section. Release builds (GoReleaser) hide them.

Index

Constants

View Source
const GroupID = "experimental"

GroupID is the cobra group experimental commands are filed under.

Variables

View Source
var Visible = "true"

Visible controls whether experimental commands are shown in help. It is stamped by GoReleaser via ldflags (-X github.com/entireio/cli/cmd/entire/cli/experimental.Visible=false) to hide them in shipped binaries. It defaults to "true", so every non-release build (go build, go run, mise) shows them. The commands remain experimental and fully runnable regardless of this flag — it only toggles visibility.

Functions

func IsVisible

func IsVisible() bool

IsVisible reports whether experimental commands are shown in help.

func Register

func Register(parent, child *cobra.Command)

Register adds child under parent as an experimental command.

When experimental commands are visible, child is filed under parent's "Experimental commands:" help group (registering the group on parent once). When hidden, child is marked Hidden and left ungrouped — so release help never carries an empty group header, and cobra never references a group ID that was not registered.

Register overrides any Hidden value the child's constructor set, so callers do not need to touch the constructors (including ones in other packages).

Types

This section is empty.

Jump to

Keyboard shortcuts

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