config

package
v0.0.0-...-5c2efdf Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitOptions

type GitOptions struct {
	// Bare is equivalent to `--bare` from git with additional
	// quality-of-life improvements.
	Bare bool `toml:"bare"`
}

type Options

type Options struct {
	// GiorPath is the root path where all repositories are cloned
	// to. For example, the repo example.com/foobar would cloned to the
	// path <GiorPath>/example.com/foobar.
	GiorPath string     `toml:"gior-path"`
	Git      GitOptions `toml:"git"`
}

Options is the top-level struct that holds all configuration that will be parsed from the configuration file.

func DefaultOptions

func DefaultOptions() Options

func Load

func Load(logger *slog.Logger, path string) (Options, error)

Load returns config Options for the configuration file at the provided path. If the configuration file does not exist, default Options are returned without erroring.

Jump to

Keyboard shortcuts

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