config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package config reads and writes $XDG_CONFIG_HOME/lfed/config.yaml.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() (string, error)

Dir returns the config directory. LFED_CONFIG_DIR overrides it for tests.

Types

type Config

type Config struct {
	CurrentContext string `yaml:"current_context,omitempty"`
}

Config is the on-disk document.

func Load

func Load() (*Config, error)

Load reads the config file. A missing file yields an empty Config.

func (*Config) Save

func (c *Config) Save() error

Save writes the config file, creating the directory with mode 0700.

Jump to

Keyboard shortcuts

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