util

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

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

Creates or truncates the named file,if the file path contains directories, it will make them first.

func FileExists

func FileExists(file string) bool

FileExists checks whether a file exists.

func FileExistsOrCreate

func FileExistsOrCreate(dir string) error

文件是否存在,不存递归创建文件夹

func GetModule

func GetModule() string

func GetPbAlias added in v1.3.4

func GetPbAlias(pbPath string) string

根据pbPath获取pb别名字段

func GetPbFiles

func GetPbFiles(pbFile string) []string

func GetProtoFiles

func GetProtoFiles(protoFile string) []string

func GetSwaggerFiles

func GetSwaggerFiles(swaggerFile string) []string

func GoFormat

func GoFormat(file string) error

GoFormat formats go file in canonical gofmt style and fix import statements.

func GoInstallCmd added in v1.2.15

func GoInstallCmd(arg string) ([]byte, error)

GoInstallCmd 初始化必需类库

func OpenOrCreate

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

OpenOrCreate opens a file if it exists, otherwise creates it. If the file path contains directories, it will make them first.

func PrintC added in v1.2.15

func PrintC(l, i int)

PrintC 打印进度

Types

This section is empty.

Jump to

Keyboard shortcuts

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