Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v1.3.29 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://api.flashcat.cloud"
)

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

func ConfigPath

func ConfigPath() string

func ConfigSource

func ConfigSource(key string) string

ConfigSource returns the source of a config value for display.

func MaskKey

func MaskKey(key string) string

MaskKey partially masks an app key for display.

func Save

func Save(cfg *Config) error

Save writes the config to disk with restricted permissions.

Types

type Config

type Config struct {
	AppKey  string `yaml:"app_key"`
	BaseURL string `yaml:"base_url"`
}

func Load

func Load() (*Config, error)

Load reads config from file, then overlays environment variables. Flag overrides are applied by the caller.

Jump to

Keyboard shortcuts

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