example

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAdvancedExample

func RunAdvancedExample()

RunAdvancedExample 运行高级编码模块示例

func RunExample

func RunExample()

RunExample 运行编码模块示例

Types

type Address

type Address struct {
	Street  string `json:"street" xml:"street" yaml:"street" toml:"street" msgpack:"street" bson:"street"`
	City    string `json:"city" xml:"city" yaml:"city" toml:"city" msgpack:"city" bson:"city"`
	State   string `json:"state" xml:"state" yaml:"state" toml:"state" msgpack:"state" bson:"state"`
	ZipCode string `json:"zip_code" xml:"zip_code" yaml:"zip_code" toml:"zip_code" msgpack:"zip_code" bson:"zip_code"`
}

Address 地址结构

type Employee

type Employee struct {
	ID        int      `json:"id" xml:"id" yaml:"id" toml:"id" msgpack:"id" bson:"id"`
	Name      string   `json:"name" xml:"name" yaml:"name" toml:"name" msgpack:"name" bson:"name"`
	Email     string   `json:"email" xml:"email" yaml:"email" toml:"email" msgpack:"email" bson:"email"`
	Address   Address  `json:"address" xml:"address" yaml:"address" toml:"address" msgpack:"address" bson:"address"`
	Skills    []string `json:"skills" xml:"skills" yaml:"skills" toml:"skills" msgpack:"skills" bson:"skills"`
	IsManager bool     `json:"is_manager" xml:"is_manager" yaml:"is_manager" toml:"is_manager" msgpack:"is_manager" bson:"is_manager"`
}

Employee 员工结构

type Person

type Person struct {
	Name    string   `json:"name" xml:"name" yaml:"name" form:"name"`
	Age     int      `json:"age" xml:"age" yaml:"age" form:"age"`
	Email   string   `json:"email" xml:"email" yaml:"email" form:"email"`
	Hobbies []string `json:"hobbies" xml:"hobbies" yaml:"hobbies" form:"hobbies"`
}

Person 示例结构体

Jump to

Keyboard shortcuts

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