cli

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppGo        = "go"
	AppGoImports = "goimports"
)
View Source
const (
	AppNPM = "npm"
	AppNPX = "npx"
)
View Source
const (
	ShellBash = "/bin/bash"
	ShellZsh  = "/bin/zsh"
)
View Source
const (
	AppGit = "git"
)

Variables

View Source
var (
	ErrNotFound          = errors.New("dependency not found")
	ErrGitCommitNotValid = errors.New("git commit flag not valid")
	ErrGitAddNoFiles     = errors.New("git add no files provided")
)
View Source
var (
	CommitTypes = []CommitType{
		"ci",
		"feat",
		"fix",
		"refactor",
		"style",
		"chore",
		"revert",
	}
)

Functions

func GitAdd

func GitAdd(dir string, files []string) error

func GitCommit

func GitCommit(dir string, msgType CommitType, msg string) error

func GitInit

func GitInit(dir string) error

func GitRepoVersion

func GitRepoVersion(repo string) (string, error)

func GitSetupDefault

func GitSetupDefault(dir, repo string) error

GitSetupDefault will create .git folder mod master branch to main and create the init commit

func GitVer

func GitVer() (string, error)

func GoClean added in v0.13.0

func GoClean(filePath string) error

func GoFmt added in v0.13.0

func GoFmt(fPath string) error

func GoGet

func GoGet(dir, pkg string) error

func GoImports added in v0.13.0

func GoImports(fPath string) error

func GoInstall

func GoInstall(pkg string) error

func GoModVer added in v0.13.0

func GoModVer() (string, error)

func GoTidy

func GoTidy(dir string) error

func GoVer

func GoVer() (string, error)

func GoVet added in v0.13.0

func GoVet(fPath string) error

func Lookup

func Lookup(cmd string) bool

Lookup check if an app is available in CLI

func NPMVer

func NPMVer() (string, error)

func Shell

func Shell() string

func ShellIs

func ShellIs(shell string) bool

Types

type CommitType

type CommitType string

CommitType data type to ensure commitizen style guids https://github.com/commitizen-tools/commitizen

Jump to

Keyboard shortcuts

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