collections

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareActions

func CompareActions(current, next plans.Action) plans.Action

CompareActions will compare current and next, and return plans.Update if they are different, and current if they are the same.

func ProcessSlice

func ProcessSlice[Input any](before, after []Input, process ProcessIndices, isObjType IsObjType[Input])

func TransformMap

func TransformMap[Input any](before, after map[string]Input, process ProcessKey) (map[string]computed.Diff, plans.Action)

func TransformSlice

func TransformSlice[Input any](before, after []Input, process TransformIndices, isObjType IsObjType[Input]) ([]computed.Diff, plans.Action)

Types

type IsObjType

type IsObjType[Input any] func(input Input) bool

type ProcessIndices

type ProcessIndices func(before, after int)

type ProcessKey

type ProcessKey func(key string) computed.Diff

type TransformIndices

type TransformIndices func(before, after int) computed.Diff

Jump to

Keyboard shortcuts

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