helper

package
v3.8.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RegGoodName match a good option, argument name
	RegGoodName = `^[0-9a-zA-Z][\w-]*$`
	// RegGoodCmdName match a good command name
	RegGoodCmdName = `^[a-zA-Z][\w-]*$`
	// RegGoodCmdId match command id. eg: "self:init"
	RegGoodCmdId = `^[a-zA-Z][\w:-]*$`
)

Variables

This section is empty.

Functions

func IsGoodCmdId

func IsGoodCmdId(name string) bool

IsGoodCmdId check

func IsGoodCmdName

func IsGoodCmdName(name string) bool

IsGoodCmdName check

func IsGoodName

func IsGoodName(name string) bool

IsGoodName check

func Panicf

func Panicf(format string, v ...any)

Panicf message

func RenderText

func RenderText(input string, data any, fns template.FuncMap, isFile ...bool) string

RenderText render text template with data. TODO use strutil.RenderText()

Types

This section is empty.

Jump to

Keyboard shortcuts

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