starcmp

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package starcmp provides utilities for running cmp.Diff on Starlark values. It's not in the startest package because startest depends on internal/starlark, but the internal/starlark tests want to compare things.

Index

Constants

This section is empty.

Variables

View Source
var Compare = cmp.Option(cmp.Comparer(func(a, b starlark.Value) bool {
	x, err := starlark.Compare(syntax.EQL, a, b)
	if err != nil {
		panic(fmt.Sprintf("compare failed: %v", err))
	}
	return x
}))

Compare is a cmp.Option that compares Starlark values with Starlark's `==` operator.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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