structutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy added in v0.1.26

func Copy(src interface{}) interface{}

Copy creates a deep copy of whatever is passed to it and returns the copy in an interface{}. The returned value will need to be asserted to the correct type.

func CopyStruct

func CopyStruct(src, dst interface{})

func DeepFields

func DeepFields(ifaceType reflect.Type) []reflect.StructField

func JsonMarshal

func JsonMarshal(value map[string]interface{}) (string, error)

The default behavior is to escape &, <, and > to \u0026, \u003c, and \u003e to avoid certain safety problems that can arise when embedding JSON in HTML.

func JsonUnMarshal

func JsonUnMarshal(value string) (map[string]interface{}, error)

func Set2List

func Set2List(s []interface{}) []string

func StructCopy

func StructCopy(DstStructPtr interface{}, SrcStructPtr interface{})

func ToString

func ToString(obj interface{}) (string, error)

have all fields

Types

type Interface added in v0.1.26

type Interface interface {
	DeepCopy() interface{}
}

Interface for delegating copy process to type

Jump to

Keyboard shortcuts

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