diff

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

The diff package provides helpers for computing rich diffs between Starlark values.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edit

type Edit struct {
	starlark.Sliceable
	// contains filtered or unexported fields
}

func (*Edit) Attr

func (e *Edit) Attr(name string) (starlark.Value, error)

func (*Edit) AttrNames

func (e *Edit) AttrNames() []string

func (*Edit) Kind

func (e *Edit) Kind() EditKind

func (*Edit) String

func (e *Edit) String() string

func (*Edit) Type

func (e *Edit) Type() string

type EditKind

type EditKind = starlark.String
var (
	EditKindDelete  EditKind = "delete"
	EditKindCommon  EditKind = "common"
	EditKindAdd     EditKind = "add"
	EditKindReplace EditKind = "replace"
)

type LiteralDiff

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

func (*LiteralDiff) Attr

func (d *LiteralDiff) Attr(name string) (starlark.Value, error)

func (*LiteralDiff) AttrNames

func (d *LiteralDiff) AttrNames() []string

func (*LiteralDiff) Freeze

func (d *LiteralDiff) Freeze()

func (*LiteralDiff) Hash

func (d *LiteralDiff) Hash() (uint32, error)

func (*LiteralDiff) New

func (d *LiteralDiff) New() starlark.Value

func (*LiteralDiff) Old

func (d *LiteralDiff) Old() starlark.Value

func (*LiteralDiff) String

func (d *LiteralDiff) String() string

func (*LiteralDiff) Truth

func (d *LiteralDiff) Truth() starlark.Bool

func (*LiteralDiff) Type

func (d *LiteralDiff) Type() string

type MappingDiff

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

func (*MappingDiff) Attr

func (d *MappingDiff) Attr(name string) (starlark.Value, error)

func (*MappingDiff) AttrNames

func (d *MappingDiff) AttrNames() []string

func (*MappingDiff) Edits

func (*MappingDiff) Freeze

func (d *MappingDiff) Freeze()

func (*MappingDiff) Has

func (*MappingDiff) Hash

func (d *MappingDiff) Hash() (uint32, error)

func (*MappingDiff) New

func (d *MappingDiff) New() starlark.Value

func (*MappingDiff) Old

func (d *MappingDiff) Old() starlark.Value

func (*MappingDiff) String

func (d *MappingDiff) String() string

func (*MappingDiff) Truth

func (d *MappingDiff) Truth() starlark.Bool

func (*MappingDiff) Type

func (d *MappingDiff) Type() string

type SetDiff

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

func (*SetDiff) Attr

func (d *SetDiff) Attr(name string) (starlark.Value, error)

func (*SetDiff) AttrNames

func (d *SetDiff) AttrNames() []string

func (*SetDiff) Edits

func (d *SetDiff) Edits() starlark.Iterable

func (*SetDiff) Freeze

func (d *SetDiff) Freeze()

func (*SetDiff) Hash

func (d *SetDiff) Hash() (uint32, error)

func (*SetDiff) New

func (d *SetDiff) New() starlark.Value

func (*SetDiff) Old

func (d *SetDiff) Old() starlark.Value

func (*SetDiff) String

func (d *SetDiff) String() string

func (*SetDiff) Truth

func (d *SetDiff) Truth() starlark.Bool

func (*SetDiff) Type

func (d *SetDiff) Type() string

type SliceableDiff

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

func (*SliceableDiff) Attr

func (d *SliceableDiff) Attr(name string) (starlark.Value, error)

func (*SliceableDiff) AttrNames

func (d *SliceableDiff) AttrNames() []string

func (*SliceableDiff) Edits

func (d *SliceableDiff) Edits() starlark.Tuple

func (*SliceableDiff) Freeze

func (d *SliceableDiff) Freeze()

func (*SliceableDiff) Hash

func (d *SliceableDiff) Hash() (uint32, error)

func (*SliceableDiff) New

func (d *SliceableDiff) New() starlark.Value

func (*SliceableDiff) Old

func (d *SliceableDiff) Old() starlark.Value

func (*SliceableDiff) String

func (d *SliceableDiff) String() string

func (*SliceableDiff) Truth

func (d *SliceableDiff) Truth() starlark.Bool

func (*SliceableDiff) Type

func (d *SliceableDiff) Type() string

type ValueDiff

type ValueDiff interface {
	starlark.HasAttrs

	Old() starlark.Value
	New() starlark.Value
}

func Diff

func Diff(old, new starlark.Value) (ValueDiff, error)

Diff diffs two values.

func DiffDepth

func DiffDepth(old, new starlark.Value, depth int) (ValueDiff, error)

DiffDepth diffs two values up to the given depth.

Jump to

Keyboard shortcuts

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