erkassert

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package erkassert wraps testify/assert to test Kratos errors, handling the nil interface trap via erkadapt.

erkassert 为 Kratos 错误封装 testify/assert,经 erkadapt 处理 nil 接口陷阱。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(t assert.TestingT, erk *errors.Error, msgAndArgs ...interface{}) bool

Error asserts that erk is non-nil.

Error 断言 erk 非 nil。

func Is

func Is(t assert.TestingT, expected *errors.Error, erk *errors.Error, msgAndArgs ...interface{}) bool

Is asserts that two Kratos errors match on nil state, Reason and Code.

Is 断言两个 Kratos 错误在 nil 状态、Reason 和 Code 上一致。

func NoError

func NoError(t assert.TestingT, erk *errors.Error, msgAndArgs ...interface{}) bool

NoError asserts that erk is nil.

NoError 断言 erk 为 nil。

Types

This section is empty.

Jump to

Keyboard shortcuts

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