lib

package
v0.0.0-...-1384d0f Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName          = "ggt-cli"
	ProfilesDirMode  = os.FileMode(0700)
	ProfilesFileMode = os.FileMode(0600)
)
View Source
const (
	GitUrlRegex = "((git|ssh|http(s)?)|(git@[\\w\\.]+))(:(\\/\\/)?)([\\w\\.@\\:/\\-~]+)(\\.git)?(\\/)?"
)

Variables

This section is empty.

Functions

func Add

func Add() error

func AddProfile

func AddProfile(newProfile globals.Profile) error

func Clone

func Clone(url string, dest string, profile globals.Profile) error

func Commit

func Commit(message string) error

func Config

func Config(dir string, profile globals.Profile) error

func ExitWithError

func ExitWithError(err error)

func GetProfilePath

func GetProfilePath() (string, error)

func ParseGitDestDir

func ParseGitDestDir(url string) string

func PromptInput

func PromptInput(label string, validate promptui.ValidateFunc) (string, error)

func PromptNewApiProfile

func PromptNewApiProfile() (globals.ApiProfile, error)

func PromptNewProfile

func PromptNewProfile() (globals.Profile, error)

func PromptSelectProfile

func PromptSelectProfile(prompt string) (globals.Profile, int, error)

func PromptYesNo

func PromptYesNo(prompt string) (bool, error)

func Push

func Push() error

func ReadInput

func ReadInput(prompt string, reader *bufio.Reader) string

func ReadProfiles

func ReadProfiles() ([]globals.Profile, error)

func RemoveProfile

func RemoveProfile(profiles []globals.Profile, index int) error

func SelectItem

func SelectItem(label string, items []string) (int, string, error)

func ValidateEmail

func ValidateEmail(input string) error

func ValidateEmpty

func ValidateEmpty(input string) error

func ValidateGitUrl

func ValidateGitUrl(input string) error

Types

type Runner

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

func NewRunner

func NewRunner(name string, args ...string) *Runner

func (*Runner) Run

func (r *Runner) Run() error

func (*Runner) WithDir

func (r *Runner) WithDir(dir string) *Runner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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