testcode

package
v1.48.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package testcode contains code and generated code for testing wrapgen. It will only give correct results if "go generate" has run on it, so CI must do that outside of the test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arithmetic

type Arithmetic interface {
	Add(a, b int) int
	// Double returns an error, so it should be wrapped to measure its
	// duration.
	Double(a int) (int, error)
}

type MonitoredArithmetic

type MonitoredArithmetic struct {
	Wrapped Arithmetic
	Observe func(operation string, duration time.Duration, success bool)
}

func (*MonitoredArithmetic) Add

func (w *MonitoredArithmetic) Add(a int, b int) int

func (*MonitoredArithmetic) Double

func (w *MonitoredArithmetic) Double(a int) (int, error)

Jump to

Keyboard shortcuts

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