typeobserver

package
v0.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package typeobserver counts the types of values it observes, and when each was first and last seen, for failure messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

Observer counts the types of values it observes, and when each was first and last seen. Its String method lists them, newest first. It is safe for concurrent use.

func New

func New() *Observer

New returns an empty Observer.

func (*Observer) Observe

func (o *Observer) Observe(v any)

Observe records v, which must not be a nil interface.

func (*Observer) String

func (o *Observer) String() string

Jump to

Keyboard shortcuts

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