extconversion

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 1 Imported by: 17 modules, 24 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(from any, to any) error

Convert converts a value (from - typically a struct or map[string]interface{}) to another value (to - typically also a struct or map[string]interface{}). This is helpful in a variety of cases, e.g., to encode ActionKit's action state.

This function leverages json.Marshal and json.Unmarshal internally whereas it previously leveraged the mapstructure package. It turned out that using the json package is beneficial, as many go internal (time.Time) and external packages (Kubernetes resource types) are compatible with the json package, but not with mapstructure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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