utils

package
v0.0.0-...-d39f515 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculatePercentageChange

func CalculatePercentageChange[T calculatePercentageChangeArg](oldValue T, newValue T) (percentageChange int16)

Types

type Optional

type Optional[T any] struct {
	Defined bool
	Value   *T
}

func (*Optional[T]) UnmarshalJSON

func (o *Optional[T]) UnmarshalJSON(data []byte) error

UnmarshalJSON is implemented by deferring to the wrapped type (T). It will be called only if the value is defined in the JSON payload.

Jump to

Keyboard shortcuts

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