experimental

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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) and nightlies show them, grouped under an "Experimental commands:" help section. Stable release builds hide them.

Index

Constants

View Source
const GroupID = "experimental"

GroupID is the cobra group experimental commands are filed under.

Variables

This section is empty.

Functions

func IsVisible

func IsVisible() bool

IsVisible reports whether experimental commands are shown in help.

Visibility follows the build's resolved version rather than a separate stamp, so every packager that stamps versioninfo.Version (GoReleaser, nixpkgs, `go install @<tag>`) gets release behavior for free. Only a stable release hides them; "dev", nightlies, and commit-stamped builds show them. Call after versioninfo.Load() so the version is resolved.

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