dict

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareMergeObject

func CompareMergeObject(src, dest map[string]any, paths ...string) (map[string]any, bool)

(src, dest,["spec.userId","spec.userName"])

func Delete

func Delete(data map[string]any, path string)

Delete data = {"a":{"b":{"c":123}}} Delete(data,"a.b.c") = {"a":{"b":""}}

func Get

func Get(data map[string]any, path string) (value any)

Get data = {"a":{"b":{"c":123}}} Get(data,"a.b.c") = 123

func Set

func Set(data map[string]any, path string, value any)

Set "path":"a.b.c" data = {"a":{"b":{"c":123}}} Set(data,"a.b.c",123)

Types

This section is empty.

Jump to

Keyboard shortcuts

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