commands

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

You can use the "packr clean" command to clean up this, and any other packr generated files.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "v0.0.1"
	BuildTime = tools.Tools.TimeFormat(time.Now(), "Y-m-d H:i:s")
)

Functions

func BuildAction

func BuildAction(c *cli.Context) error

func EnvFile

func EnvFile() (string, error)

EnvFile returns the name of the Go environment configuration file.

func GetVersion

func GetVersion() string

func Getenv

func Getenv(key string) string

Getenv gets the value from env or configuration.

func InitCommands

func InitCommands() []*cli.Command

func NewAction

func NewAction() cli.ActionFunc

func RegexpReplace

func RegexpReplace(reg, src, temp string) string

RegexpReplace replace regexp

func RunAction

func RunAction(c *cli.Context) error

Types

type Flags

type Flags struct {
	Name      string
	Path      string
	ModPrefix string
}

func (*Flags) ToNewAction

func (f *Flags) ToNewAction() []cli.Flag

type Tool

type Tool struct {
	Name      string    `json:"name"`
	Alias     string    `json:"alias"`
	BuildTime time.Time `json:"build_time"`
	Install   string    `json:"install"`
	Dir       string    `json:"dir"`
	Summary   string    `json:"summary"`
	Platform  []string  `json:"platform"`
	Author    string    `json:"author"`
	URL       string    `json:"url"`
}

Tool is kratos tool.

type VersionOptions

type VersionOptions struct {
	Version   string
	BuildTime string
	GoVersion string
	Os        string
	Arch      string
}

VersionOptions include version

Jump to

Keyboard shortcuts

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