README ¶ validx 包 Package validx 提供前置条件、不变量和非空字符串检查助手。 Validation failures return classified errx errors while keeping validation free of external dependencies. Expand ▾ Collapse ▴ Documentation ¶ Overview ¶ Package validx 提供前置条件和不变量错误助手。 Index ¶ func Invariant(ok bool, op string, message string) error func Precondition(ok bool, op string, message string) error func RequireNonEmpty(op string, name string, value string) error Examples ¶ RequireNonEmpty Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Invariant ¶ func Invariant(ok bool, op string, message string) error func Precondition ¶ func Precondition(ok bool, op string, message string) error func RequireNonEmpty ¶ func RequireNonEmpty(op string, name string, value string) error Example ¶ package main import ( "github.com/ZoneCNH/kernel/validx" ) func main() { _ = validx.RequireNonEmpty("example", "name", "value") } Output: Share Format Run Types ¶ This section is empty. Source Files ¶ View all Source files validx.go Click to show internal directories. Click to hide internal directories.