zg

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigDir = "/.config"
View Source
var ConfigFile = "/zg-repos.json"

Location of the config file under the $HOME dir

Functions

func DisableGoModReplaceDirectives added in v0.3.0

func DisableGoModReplaceDirectives(repoDir string, reposToReplace []string) error

func EnableGoModReplaceDirectives added in v0.3.0

func EnableGoModReplaceDirectives(repoDir string, reposToReplace []string) error

func Exec added in v0.2.0

func Exec(binary string, params ...string) (*bytes.Buffer, *bytes.Buffer, error)

func GetGoModInfo added in v0.3.0

func GetGoModInfo(repoDir string) (*modfile.File, error)

func GoModTidy added in v1.6.0

func GoModTidy(repoDir string)

func HasGoModFile added in v0.3.0

func HasGoModFile(repoDir string) bool

func IsPathGitRepo added in v0.3.0

func IsPathGitRepo(path string) bool

func PrintRepos

func PrintRepos(tag string, repos []Repo)

Pretty print all repos in list

func RegisterRepo

func RegisterRepo(location string, tag string, repos []Repo)

Add a new repo to the list

func RunCommand added in v1.5.0

func RunCommand(repos []Repo, tag string, args ...string) error

func RunGitCommand added in v1.5.0

func RunGitCommand(repos []Repo, tag string, args ...string)

Run a git command across all repos with matching tag

func SetConfigFilePath

func SetConfigFilePath()

Set the path to the config file

func TableStatus

func TableStatus(repos []Repo, tag string, out io.Writer)

func UnregisterRepo

func UnregisterRepo(path string, repos []Repo)

Remove a repo from the list

func ValidTag

func ValidTag(str string) bool

Check for valid tag

Types

type Repo

type Repo struct {
	Name     string `json:"name"`
	Location string `json:"location"`
	Tag      string `json:"tag"`
}

Repo struct

func GetRepos

func GetRepos() []Repo

Deserialize the repos from the config file into structs

type StdOutErr

type StdOutErr struct {
	StdErr bytes.Buffer
	Err    error
}

func (*StdOutErr) Error

func (err *StdOutErr) Error() string

type VersionInfo added in v0.3.0

type VersionInfo struct {
}

Jump to

Keyboard shortcuts

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