util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GH_CLI_COMMAND = "gh auth token"
View Source
const GITHUB_TOKEN_ENV = "GITHUB_OAUTH_TOKEN"

Variables

This section is empty.

Functions

func GetGHToken

func GetGHToken() string

GetGHToken retrieves a GitHub access token from the environment variable `GITHUB_OAUTH_TOKEN`. If the environment variable is not set, it attempts to obtain the token by executing the GitHub CLI `gh auth token` command. If both methods fail, the function terminates the program with a fatal error, providing guidance for the user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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