config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config stores the CLI's local configuration (the API key) in os.UserConfigDir()/biblioscan/config.json.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() (string, error)

Path returns the config file location.

func Save

func Save(cfg Config) error

Save writes the config with owner-only permissions (the key is a secret).

Types

type Config

type Config struct {
	APIKey string `json:"api_key"`
}

func Load

func Load() (Config, error)

Load reads the config; a missing file is not an error.

Jump to

Keyboard shortcuts

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