config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 8 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 stores pakket's defaults, like Keka's preferences.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(c Config, key string) (string, error)

Get returns one setting as text.

func Keys

func Keys() []string

Keys lists every setting name.

func Path

func Path() string

Path is $XDG_CONFIG_HOME/pakket/config.json or ~/.config/pakket/config.json.

func Save

func Save(c Config) error

Save writes the config.

func Set

func Set(c *Config, key, val string) error

Set changes one setting from text.

Types

type Config

type Config struct {
	Format          string `json:"format"`
	Level           int    `json:"level"`
	EncryptNames    bool   `json:"encrypt_names"`
	ZipLegacy       bool   `json:"zip_legacy"`
	Solid           bool   `json:"solid"`
	ExcludeMac      bool   `json:"exclude_mac"`
	Separate        bool   `json:"separate"`
	DeleteAfterPack bool   `json:"delete_after_compress"`
	Split           string `json:"split"`
	Checksum        string `json:"checksum"`
	ExportPassword  bool   `json:"export_password"`
	CompressDest    string `json:"compress_dest"`

	ExtractDest  string `json:"extract_dest"`
	Folder       string `json:"folder"`
	DeleteAfterX bool   `json:"delete_after_extract"`
	Quarantine   bool   `json:"quarantine"`
	Encoding     string `json:"encoding"`
	Overwrite    string `json:"overwrite"`
	IgnoreGzName bool   `json:"ignore_gz_name"`
	Nested       bool   `json:"nested"`
	Keychain     bool   `json:"keychain"`
	Notify       bool   `json:"notify"`
	ShowHidden   bool   `json:"show_hidden"`
}

Config holds every default. Keys are the json names.

func Default

func Default() Config

Default matches Keka's out-of-the-box behaviour where it has one.

func Load

func Load() Config

Load reads the config, falling back to defaults for anything missing.

Jump to

Keyboard shortcuts

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