config

package
v0.0.0-...-c75e471 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtendProjectFromSubdirOf

func ExtendProjectFromSubdirOf(searchPath string, projectConfigPath string) error

func GetLocation

func GetLocation() (string, error)

func Init

func Init() error

func WriteProjectConfig

func WriteProjectConfig(projectConfigPath string, projectConfig *ProjectConfig) error

Types

type GitRepo

type GitRepo struct {
	Name string            `yaml:"name,omitempty"`
	Path string            `yaml:"path,omitempty"`
	Tags map[string]string `yaml:"tags,omitempty"`
}

func (*GitRepo) GetName

func (c *GitRepo) GetName() string

type GlobalConfig

type GlobalConfig struct {
	DefaultShell string             `yaml:"defaultShell"`
	Shells       []*ShellExecConfig `yaml:"shells"`
}

func Get

func Get() (*GlobalConfig, error)

func GetDefaultConfig

func GetDefaultConfig() *GlobalConfig

func (*GlobalConfig) GetShellOrDefault

func (c *GlobalConfig) GetShellOrDefault(shellName string) (*ShellExecConfig, error)

type ProjectConfig

type ProjectConfig struct {
	GitRepos []*GitRepo `yaml:"gitRepos,omitempty"`
}

func GetProjectConfig

func GetProjectConfig(projectConfigPath string) (*ProjectConfig, error)

func (*ProjectConfig) GetGitRepos

func (c *ProjectConfig) GetGitRepos() []*GitRepo

func (*ProjectConfig) HasGitRepo

func (c *ProjectConfig) HasGitRepo(path string) bool

type ShellExecConfig

type ShellExecConfig struct {
	Name string `yaml:"name"`

	// Path to the binary or only name if on path.
	Bin string `yaml:"bin"`

	Args []string `yaml:"args"`

	// The arg that preceedes a text command to execute.
	CmdArg string `yaml:"cmdArg"`

	// The arg that preceedes a script file to execute.
	ScriptArg string `yaml:"scriptArg"`
}

type TagFilters

type TagFilters struct {
	// contains filtered or unexported fields
}

func NewTagFilters

func NewTagFilters(tfs []string) *TagFilters

func (*TagFilters) IsMatch

func (t *TagFilters) IsMatch(gitRepo *GitRepo) (bool, error)

Jump to

Keyboard shortcuts

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