internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoGet

func GoGet(mod string) error

func GoModTidy

func GoModTidy() error

func Prompt

func Prompt(w io.Writer, message, defaultAnswer string) string

Prompt shows simple prompt

func PromptBool

func PromptBool(w io.Writer, message string, defaultToYes bool) bool

PromptBool shows a yes/no prompt

func PromptInt

func PromptInt(w io.Writer, message string, defaultAnswer int) int

PromptInt shows simple prompt for integer

func PromptIntWithValidate

func PromptIntWithValidate(w io.Writer, message string, defaultAnswer int, validate func(int) error) int

PromptIntWithValidate shows simple prompt for integer with validation

func PromptWithValidate

func PromptWithValidate(w io.Writer, message, defaultAnswer string, validate func(string) error) string

PromptWithValidate shows simple prompt with validation

Types

type CopyRight struct {
	Year   int
	Author string
	Email  string
}

type Homebrew

type Homebrew struct {
	TapRepository struct {
		Owner string
		Repo  string
	}
	Description string
}

type ModInfo

type ModInfo struct {
	Path, Dir string
}

func NewModInfo

func NewModInfo() (*ModInfo, error)

func (*ModInfo) ModName

func (m *ModInfo) ModName(wd string) string

type Project

type Project struct {
	PkgName      string
	AbsolutePath string
	AppName      string
	Description  string
	SubCommands  []string
	UseMIT       bool
	CopyRight    CopyRight
	UseHomebrew  bool
	Homebrew     Homebrew
}

Project contains name, license and paths to projects.

func (*Project) Create

func (p *Project) Create(fs afero.Fs) error

Jump to

Keyboard shortcuts

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