Documentation
¶
Overview ¶
Package checkchange defines a utility for determining whether a value has changed since the last time it was checked.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Update ¶
func Update[T EqualCloner[T]](old *T, new T) (changed bool)
Update sets *old to a clone of new if they are not equal, returning whether they were different.
It only modifies *old if they are different. old must be non-nil.
Types ¶
type EqualCloner ¶
EqualCloner is an interface for types that can be compared for equality and can be cloned.
Click to show internal directories.
Click to hide internal directories.