cliconfig

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir returns the XDG-compliant config directory for the CLI.

func Path

func Path() string

Path returns the full path to the config file.

func ResolveCredentials

func ResolveCredentials() (serverURL, token string, err error)

ResolveCredentials returns the server URL and token, preferring env vars over the config file.

func Save

func Save(cfg *Config) error

Save writes credentials to the config file.

Types

type Config

type Config struct {
	Server string `json:"server"`
	Token  string `json:"token"`
}

Config stores CLI credentials and server URL.

func Load

func Load() (*Config, error)

Load loads credentials from the config file.

Jump to

Keyboard shortcuts

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