appbase

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir added in v0.9.0

func CopyDir(dst, src string) (err error)

复制目录

func CopyFile added in v0.9.0

func CopyFile(dst, src string) error

复制文件

func HasExt

func HasExt(path string, exts ...string) bool

路径名是否包含后缀, 忽略大小写区别

func IsNativeDir

func IsNativeDir(path string) bool

是否为本地存在的目录

func IsNativeFile

func IsNativeFile(path string, exts ...string) bool

是否为本地存在的文件, 并满足后缀名

func IsValidAppName

func IsValidAppName(s string) bool

为合法的 app 名字

func IsValidPkgpath

func IsValidPkgpath(s string) bool

为合法的包路径

func MakeFlag_ld_max_memory

func MakeFlag_ld_max_memory() *cli.IntFlag

func MakeFlag_ld_stack_size

func MakeFlag_ld_stack_size() *cli.IntFlag

func MakeFlag_output

func MakeFlag_output() *cli.StringFlag

输出路径

func MakeFlag_tags

func MakeFlag_tags() *cli.StringFlag

构建的 Tags

func MakeFlag_target

func MakeFlag_target() *cli.StringFlag

构建的目标

func PathExists

func PathExists(path string) bool

本地路径存在

func ReplaceExt

func ReplaceExt(path string, extOld, extNew string) string

替换后缀名

Types

type Option

type Option struct {
	Debug        bool
	WaBackend    string
	BuilgTags    []string
	TargetArch   string
	TargetOS     string
	Clang        string
	Llc          string
	LD_StackSize int
	LD_MaxMemory int
}

命令行选项

func BuildOptions

func BuildOptions(c *cli.Context, waBackend ...string) *Option

func (*Option) Adjust

func (opt *Option) Adjust()

构建命令行程序对象

func (*Option) Config

func (opt *Option) Config() *config.Config

Jump to

Keyboard shortcuts

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