helpers

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigFileNotFound = errors.New("config file not found")

ErrConfigFileNotFound is returned when no configuration file can be located.

Functions

func FindConfigFile

func FindConfigFile(appName string) (string, error)

FindConfigFile searches for a configuration file in standard locations. The appName parameter controls the file name patterns (e.g. "autobump" -> ".autobump.yaml"). Returns the path to the first file found, or ErrConfigFileNotFound if none is found. Exported for use by autobump and autoupdate to locate their configuration files.

func ResolveTokenFromEnv added in v0.4.0

func ResolveTokenFromEnv(serviceType entities.ServiceType) string

ResolveTokenFromEnv returns the first non-empty token found in provider-specific environment variables for the given service type. Returns an empty string if no token is found.

Exported for use by autobump and autoupdate to resolve authentication tokens from the environment when no explicit token is configured.

func TokenEnvHint added in v0.4.0

func TokenEnvHint(serviceType entities.ServiceType) string

TokenEnvHint returns a human-readable string listing the environment variables checked for the given service type (e.g. "GITHUB_TOKEN or GH_TOKEN"). Returns "<unknown provider>" for unsupported service types.

Exported for use by autobump and autoupdate to produce helpful error messages when no token is available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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