protoutil

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package protoutil provides utilities for manipulating protos in tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(t testing.TB, m proto.Message) *anypb.Any

Any wraps a proto message in an Any proto, or causes the test to fail.

func AnyBytes

func AnyBytes(t testing.TB, m proto.Message) []byte

AnyBytes returns the marshalled bytes of an Any proto wrapping the given message, or causes the test to fail.

func ClearOutputOnly

func ClearOutputOnly(pb proto.Message)

ClearOutputOnly clears any proto fields marked as OUTPUT_ONLY.

func IgnoreResultOutputOnly added in v0.5.0

func IgnoreResultOutputOnly() cmp.Option

IgnoreResultOutputOnly ignores all fields marked OUTPUT_ONLY during cmp comparisons.

Types

This section is empty.

Jump to

Keyboard shortcuts

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