Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDotfileToConfig

func AddDotfileToConfig(configPath string, name, path string, ignores []string) error

AddDotfileToConfig adds a new dotfile to the config file

func SaveConfig

func SaveConfig(configPath string, config *Config) error

SaveConfig saves the configuration to the file

func UpdateDotfileIgnores added in v0.5.0

func UpdateDotfileIgnores(configPath string, name string, ignores []string) error

UpdateDotfileIgnores updates the ignores for an existing dotfile in the config file

Types

type Config

type Config struct {
	Settings        SettingsConfig      `toml:"settings"`
	Dotfiles        map[string]string   `toml:"dotfiles"`
	DotfilesIgnores map[string][]string `toml:"dotfiles.ignores,omitempty"`
}

Config represents the structure of the entire configuration file

func CreateDefaultConfig added in v0.4.2

func CreateDefaultConfig() (*Config, error)

CreateDefaultConfig creates a default configuration

func LoadConfig added in v0.4.1

func LoadConfig(configPath string) (*Config, error)

LoadConfig loads the configuration from the file

type GitConfig added in v0.4.1

type GitConfig struct {
	Branch              string `toml:"branch"`
	CommitMessageFormat string `toml:"commit_message_format"`
	AutoPush            bool   `toml:"auto_push"`
}

GitConfig represents the structure of the git configuration

type SettingsConfig added in v0.4.1

type SettingsConfig struct {
	StoragePath     string                   `toml:"storage_path"`
	GitVersioning   bool                     `toml:"git_versioning"`
	ReverseSyncMode bool                     `toml:"reverse_sync"`
	Git             GitConfig                `toml:"git"`
	Security        *security.SecurityConfig `toml:"security,omitempty"`
}

SettingsConfig represents the general settings of the application

Jump to

Keyboard shortcuts

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