util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneProjectFromRemote

func CloneProjectFromRemote(dir, remote string) error

CloneProjectFromRemote clone project from remote

func CreateIfNotExist

func CreateIfNotExist(file string) (*os.File, error)

CreateIfNotExist creates a file if it is not exists

func GetCurrentPath

func GetCurrentPath() (string, error)

GetCurrentPath get current folder path

func GetFileAbsPath added in v0.0.9

func GetFileAbsPath(filePath string) string

GetFileAbsPath get file abs path

func GetFileExt added in v0.0.9

func GetFileExt(filePath string) string

GetFileExt get current file ext

func GetFileFullName added in v0.0.9

func GetFileFullName(filePath string) string

GetFileFullName get current file full name

func GetFileName added in v0.0.9

func GetFileName(filePath string) string

GetFileName get current file name

func GetFolderAbsPath added in v0.0.9

func GetFolderAbsPath(filePath string) string

GetFolderAbsPath get folder path

func GetGoModulePath

func GetGoModulePath() (string, error)

GetGoModulePath get go module path from local

func GetGoPath

func GetGoPath() (string, error)

GetGoPath get go path from env

func GetProjectPath

func GetProjectPath(name string) (string, error)

GetProjectPath get project path

func GetValueFromInput

func GetValueFromInput(label string) (string, error)

GetValueFromInput get value from input

func GetValueFromMultiSelect

func GetValueFromMultiSelect(label string, options []string) ([]string, error)

GetValueFromMultiSelect get value from multi select

func GetValueFromSelect

func GetValueFromSelect(label string, options []string) (string, error)

GetValueFromSelect get value from select

func Include added in v0.0.6

func Include(name string, list []string) bool

Include Is in the array

func IsFileExist

func IsFileExist(file string) bool

IsFileExist returns true if the specified file is exists

func IsFolderExist

func IsFolderExist(dir string) bool

IsFolderExist determine if a folder already exists

func MkdirIfNotExist

func MkdirIfNotExist(dir string) error

MkdirIfNotExist makes directories if the input path is not exists

func RemoveFolderIfExist added in v0.0.6

func RemoveFolderIfExist(dir string) error

RemoveFolderIfExist deletes the folder if it is exists

func RemoveIfExist

func RemoveIfExist(filename string) error

RemoveIfExist deletes the specified file if it is exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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