validx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 1 Imported by: 0

README

validx 包 Package

validx 提供前置条件、不变量和非空字符串检查助手。

Validation failures return classified errx errors while keeping validation free of external dependencies.

Documentation

Overview

Package validx 提供前置条件和不变量错误助手。

Index

Examples

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")
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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