Help us shape the future of Go! Take the 2026 Go Developer Survey

variableutils

package
v1.124.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidKeyMsg = "A valid key must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed"

Functions

func GetValue

func GetValue(value string, ios *iostreams.IOStreams, args []string) (string, error)

func GroupChain added in v1.124.0

func GroupChain(namespace string) []string

GroupChain returns a namespace path and the group paths above it, closest first. CI resolves a variable in that order, so a lookup that walks the group tree must use the same order.

group/subgroup -> [group/subgroup, group]
group          -> [group]
""             -> nil

func IsValidKey

func IsValidKey(key string) bool

IsValidKey checks if a key is valid if it follows the following criteria: must have no more than 255 characters; only A-Z, a-z, 0-9, and _ are allowed

func ParentNamespace added in v1.124.0

func ParentNamespace(fullPath string) string

ParentNamespace returns the namespace that holds a project or group path. A top-level path has nothing above it, so the result is empty.

acme/platform/api -> acme/platform
acme/api          -> acme

Types

This section is empty.

Jump to

Keyboard shortcuts

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