checkgrpc

package module
v0.2.1 Latest Latest
Warning

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

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

README

checkgrpc

License MIT Go version Test Coverage Status Release Go Reference

gRPC status error comparison for https://github.com/powerman/check.

Import this package as a blank import in your test file or TestMain to enable gRPC status comparison via check.Err/check.NotErr.

It also imports https://github.com/powerman/checkproto, so a single blank import covers both protobuf message and gRPC status comparison.

Documentation

Overview

Package checkgrpc provides gRPC status error comparison for github.com/powerman/check.

Import this package as a blank import in your test file or TestMain to enable gRPC status comparison via check.Err/NotErr:

import _ "github.com/powerman/checkgrpc"

It also imports github.com/powerman/checkproto, so a single blank import covers both protobuf message and gRPC status comparison.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGRPCStatus

func CheckGRPCStatus(actual, expected error) (equal, ok bool)

CheckGRPCStatus compares two errors using gRPC status comparison. It matches the built-in behavior: the actual error is unwrapped to its root cause (as check.Err does internally), and if either the unwrapped actual or the expected error implements GRPCStatus, the comparison uses proto.Equal on the converted status protos.

Types

This section is empty.

Jump to

Keyboard shortcuts

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