butil

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package butil bin util package will not run the init(), but bin will

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppFilename added in v1.3.0

func AppFilename() string

func AppName added in v1.3.0

func AppName() string

AppName get current binary application name

func Basedir added in v1.3.0

func Basedir() string

Basedir get application binary root dir.

func Clear

func Clear() error

Clear @experimental it's a try clear the cli app

func DetectPath added in v1.3.0

func DetectPath(vPath string) string

DetectPath detect path by give relative or absolute path, can correct incorrect paths normally.

func GetBasedir deprecated

func GetBasedir() string

Deprecated: get the root base dir, will rename to `Basedir()`

func GetPathDir deprecated

func GetPathDir(vPath string) string

Deprecated: the path dir by application same location, please replace use `RootPath`.

func InputOption added in v1.2.0

func InputOption(title, def string) string

InputOption need input data from stdin optional

func InputRequire added in v1.2.0

func InputRequire(title string, validFunc func(string) bool) string

InputRequire required input data from stdin

func RootPath added in v1.3.0

func RootPath(vPath string) string

RootPath the path dir by application same location.

func StringToArgs

func StringToArgs(str string) []string

StringToArgs make the string to bin/Args, it's used in interactive cli

func StringToMultiArgs

func StringToMultiArgs(str string) [][]string

StringToMultiArgs string line parse multi line, support ";" split.

Types

This section is empty.

Jump to

Keyboard shortcuts

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