configfile

package
v0.1.24 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PeelGlobalFlag added in v0.1.16

func PeelGlobalFlag(args []string) (global bool, rest []string)

PeelGlobalFlag removes -g/--global from args.

func Restore

func Restore(path string, prev []byte, perm os.FileMode) error

Restore replaces path with prev. When prev is nil the file is removed.

func WriteAtomic

func WriteAtomic(path string, data []byte, perm os.FileMode) error

WriteAtomic writes data to path via a temp file in the same directory.

func WriteTarget

func WriteTarget(files []string) (string, error)

WriteTarget picks the local-scoped config path used for /add writes.

func WriteTargetForAdd added in v0.1.16

func WriteTargetForAdd(files []string, global bool) (string, error)

WriteTargetForAdd picks the config file path for /add writes. When global is true, the first global: entry wins; otherwise local: then any bare path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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