config

package
v0.1.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFileNames = []string{
	".kittyrc.json",
	".kittyrc",
	"kitty.config.json",
}
View Source
var Debug = false

Debug controls whether to print debug info

View Source
var ErrNotExist = os.ErrNotExist

Functions

func GetKittyConfig

func GetKittyConfig(dir string) (map[string]gson.JSON, error)

GetKittyConfig will find the kitty config file in the given directory

if dir is empty, it will use the current working directory if no config file found, it will return an error wrapped ErrNotExist, use IsNotExist to check

func IsNotExist

func IsNotExist(err error) bool

func PatchKittyConfig

func PatchKittyConfig(dir string, patch func(map[string]gson.JSON) (save bool, err error)) error

func ReadKittyConfig

func ReadKittyConfig(filename string) (map[string]gson.JSON, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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