helper

package
v3.8.7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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