gutil

package
v0.0.0-...-c9a36a8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

其他工具包

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToStruct

func MapToStruct(m map[string]interface{}, o interface{}) error

将map键值对映射到对应的struct对象属性上,需要注意: 1、第二个参数为struct对象指针; 2、struct对象的公开属性才能被映射赋值; 3、map中的键名可以为小写,映射转换时会自动将键名首字母转为大写做匹配映射,如果无法匹配则忽略;

Types

This section is empty.

Jump to

Keyboard shortcuts

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