config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveProfile

func SaveProfile(profile Profile) error

SaveProfile persists the profile to disk, merging non-zero fields with the existing configuration to avoid overwriting unrelated settings.

Types

type Profile

type Profile struct {
	BaseURL string `json:"baseURL"`
	APIKey  string `json:"apiKey"`
	// Lang controls the CLI output language: "en" (default) or "zh".
	Lang string `json:"lang,omitempty"`
}

Profile holds all persistent CLI settings.

func LoadProfile

func LoadProfile() (Profile, error)

LoadProfile reads the profile from disk. Missing file returns an empty Profile without error.

Jump to

Keyboard shortcuts

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