Help us shape the future of Go! Take the 2026 Go Developer Survey

typeconstraints

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package typeconstraints computes the structural restrictions used by the binding generator. Method and comparable requirements remain go/types' job.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmpty   = errors.New("empty structural type set")
	ErrInvalid = errors.New("invalid or cyclic type constraint")
	ErrComplex = errors.New("type constraint exceeds normalization limits")
)

Functions

func Terms

func Terms(typ types.Type) ([]*types.Term, error)

Terms returns a minimal union of exact and underlying-type terms. A nil slice with no error means unrestricted, while ErrEmpty means no structural matches. The result deliberately excludes method and comparable filtering.

Types

This section is empty.

Jump to

Keyboard shortcuts

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