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

valuestest

package
v0.201.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScopeTransformer = cmp.Transformer("Scope", func(s values.Scope) *ComparableScope {
	var sc *ComparableScope = nil
	for {
		if s != nil {
			sc = &ComparableScope{
				Values: make(map[string]values.Value),
				Child:  sc,
			}
			s.LocalRange(func(k string, v values.Value) {
				sc.Values[k] = v
			})
			s = s.Pop()
		} else {
			break
		}
	}
	return sc
})

ScopeTransformer converts a scope to a ComparableScope.

Functions

func Scope added in v0.68.0

func Scope() values.Scope

Scope returns a scope that contains the prelude.

Types

type ComparableScope added in v0.68.0

type ComparableScope struct {
	Values map[string]values.Value
	Child  *ComparableScope
}

ComparableScope is a representation of a Scope that is easily compared with the cmp package.

Jump to

Keyboard shortcuts

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