compat

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONCopy

func JSONCopy(dst, src interface{}) error

JSONCopy will copy src to dst via JSON serialization/deserialization.

func JSONSliceMerge

func JSONSliceMerge(dst, src interface{}) error

JSONSliceMerge will merge two slices using JSONCopy according to these rules:

1. If `dst` and `src` are the same length, all elements are merged

2. If `dst` is longer, only the first `len(src)` elements are merged

3. If `src` is longer, first `len(dst)` elements are merged, then remaining elements are appended to `dst`

Types

This section is empty.

Jump to

Keyboard shortcuts

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