Documentation
¶
Overview ¶
Package utils provides file path dependent methods
Package utils provides file path dependent methods ¶
Package utils provides file path dependent methods ¶
Package utils provides file path dependent methods ¶
Package utils provides file path dependent methods ¶
Package utils provides file path dependent methods
Index ¶
- Constants
- func CopyFile(src, dst string) (int64, error)
- func CreateIfNotExist(file string) (*os.File, error)
- func FileExists(file string) bool
- func FormatFilename(filename string, style string) string
- func GetTemplateDir(category string) (string, error)
- func GetTemplateHome() (string, error)
- func IsNamingValid(name string) (string, bool)
- func LoadTemplate(category, file, builtin string) (string, error)
- func MaybeCreateFile(dir, subDir, file string) (*os.File, bool, error)
- func MkdirIfNotExist(dir string) error
- func PathExists(path string) (bool, error)
- func RemoveIfExist(filename string) error
- func RunCMD(arg string, dir string, in ...*bytes.Buffer) (string, error)
- type String
- func (s String) IsEmptyOrSpace() bool
- func (s String) Lower() string
- func (s String) ReplaceAll(old, new string) string
- func (s String) Source() string
- func (s String) Title() string
- func (s String) ToCamel() string
- func (s String) ToSnake() string
- func (s String) Untitled() string
- func (s String) Upper() string
Constants ¶
View Source
const ( NamingLower string = "lower" NamingCamel string = "camel" NamingSnake string = "snake" )
View Source
const (
NL = "\n"
)
Variables ¶
This section is empty.
Functions ¶
func GetTemplateDir ¶
func GetTemplateHome ¶
func MaybeCreateFile ¶
可能创建文件,如果有创建文件,返回文件句柄
Types ¶
Click to show internal directories.
Click to hide internal directories.