service

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToStruct

func MapToStruct(m interface{}, structPointer interface{}) error

MapToStruct map转struct. mqtt解析字段直接使用项目通用的json标签 mqtt传输int会转为string(int),需要开启 WeaklyTypedInput

Types

type User

type User struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	Age  int    `json:"age"`
}

User 一个用于测试的struct

Jump to

Keyboard shortcuts

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