resolve

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DomainFromForgeType

func DomainFromForgeType(forgeType string) string

DomainFromForgeType returns the default domain for a forge type string. Checks FORGE_HOST first, then config default, then well-known defaults.

func ForgeForDomain

func ForgeForDomain(domain string) (forges.Forge, error)

ForgeForDomain returns a Forge instance for the given domain. If the domain isn't a known forge, it checks config then probes the server.

func Repo

func Repo(flagRepo, flagForgeType string) (forge forges.Forge, owner, repo, domain string, err error)

Repo figures out the forge, owner, and repo name from flags or the current git remote. The -R flag takes precedence; otherwise we read the "origin" remote URL and parse it.

func TokenForDomain

func TokenForDomain(domain string) string

TokenForDomain looks up an auth token. Checks environment variables first (highest precedence), then falls back to the user config file.

func TokenForDomainEnv

func TokenForDomainEnv(domain string) string

TokenForDomainEnv looks up a token from environment variables only. Checks domain-specific variables first, then falls back to FORGE_TOKEN.

Types

This section is empty.

Jump to

Keyboard shortcuts

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