token

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 6 Imported by: 0 modules, 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 token resolves a GitHub Personal Access Token from multiple sources.

Priority order:

  1. Explicit flag value (--token / --github-token)
  2. .devlake.env file (GITHUB_PAT=...)
  3. Environment variables ($GITHUB_TOKEN / $GH_TOKEN)
  4. Interactive masked prompt (terminal)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResolveResult

type ResolveResult struct {
	Token       string
	Source      string // "flag", "envfile", "environment", "prompt"
	EnvFilePath string // non-empty if loaded from envfile (for cleanup)
}

ResolveResult contains the resolved token and its source.

func Resolve

func Resolve(flagValue, envFilePath string) (*ResolveResult, error)

Resolve attempts to find a PAT using the priority chain. Returns an error only if no token can be obtained.

Jump to

Keyboard shortcuts

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