config

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package config loads + writes the CLI config at ~/.getdebug/config.json.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path() (string, error)

Path returns the path to the on-disk config file (creating parent dirs if missing).

func Save

func Save(c *Config) error

Save writes the config atomically, mode 0600.

Types

type Config

type Config struct {
	APIBaseURL string `json:"apiBaseUrl,omitempty"`
	Token      string `json:"token,omitempty"`
	UserEmail  string `json:"userEmail,omitempty"`
}

Config holds the CLI's persistent state. Tokens live here; the user can delete the file to log out.

func Load

func Load() (*Config, error)

Load reads the config. Returns an empty Config (not an error) when the file doesn't exist — the caller decides whether that's a problem.

Jump to

Keyboard shortcuts

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