config

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 5 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) 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

Types

type Config

type Config struct {
	Settings SettingsConfig    `toml:"settings"`
	Dotfiles map[string]string `toml:"dotfiles"`
}

Config represents the structure of the entire configuration file

func CreateDefaultConfig added in v0.4.2

func CreateDefaultConfig(configPath string) (*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"`
}

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"`
	Git           GitConfig `toml:"git"`
}

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