config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddApp

func AddApp(cfg *Config, name string) error

AddApp adds an app to the config. Returns an error if the app already exists.

func DefaultPath

func DefaultPath() string

DefaultPath returns the default config file path (~/.gogitup).

func HasApp

func HasApp(cfg *Config, name string) bool

HasApp checks if an app exists in the config.

func RemoveApp

func RemoveApp(cfg *Config, name string) error

RemoveApp removes an app from the config. Returns an error if the app is not found.

func Save

func Save(path string, cfg *Config) error

Save writes the config to the given file path.

Types

type App

type App struct {
	Name string `yaml:"name"`
}

App represents a configured application.

type Config

type Config struct {
	Apps       []App  `yaml:"apps"`
	GitHubAuth bool   `yaml:"github_auth"`
	GOPROXY    string `yaml:"goproxy,omitempty"`
}

Config represents the gogitup configuration file.

func Load

func Load(path string) (*Config, error)

Load reads and parses the config file at the given path. If the file does not exist, an empty Config is returned without error.

Jump to

Keyboard shortcuts

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