Documentation ¶
Index ¶
- func CloneMessage[T proto.Message](msg T) T
- func Context(c Cleaner) context.Context
- func Equal[T comparable](t TestingT, want T, got T, format string, a ...any)
- func EqualDiff(t TestingT, want any, got any, format string, a ...any)
- func EqualMessage(t TestingT, want proto.Message, got proto.Message, format string, a ...any)
- func IsTwirpError(t TestingT, err error, code twirp.ErrorCode)
- func Must(t TestingT, err error, format string, a ...any)
- func MustNot(t TestingT, err error, format string, a ...any)
- func NewLogHandler(t Logger, level slog.Level) slog.Handler
- func NotNil[T any](t TestingT, v *T, format string, a ...any)
- type Cleaner
- type LogHandler
- func (h *LogHandler) Enabled(ctx context.Context, level slog.Level) bool
- func (h *LogHandler) Handle(ctx context.Context, r slog.Record) error
- func (h *LogHandler) WithAttrs(attrs []slog.Attr) slog.Handler
- func (h *LogHandler) WithGroup(name string) slog.Handler
- func (h *LogHandler) Write(data []byte) (int, error)
- type Logger
- type TestingT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneMessage ¶
CloneMessage allows for type safe cloning of protobuf messages.
func EqualDiff ¶ added in v0.3.0
EqualDiff runs a cmp.Diff to do a deep equal check with readable diff output.
func EqualMessage ¶
EqualMessage runs a cmp.Diff with protobuf-specific options.
Types ¶
type LogHandler ¶
type LogHandler struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.