istruct

package
v0.0.0-...-f86eec2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func T_Person

func T_Person()

func T_student

func T_student()

func T_switch

func T_switch()

Types

type Person

type Person struct {
	Name           string `json:"name"`
	City           string `json:"city"`
	Age            int
	Height, Weight float32
	// contains filtered or unexported fields
}

func NewPerson

func NewPerson(name, city string, age int) *Person

*

  • 创建某个结构体的构造函数,约定俗成的一些用法
  • @see
  • @param

func (*Person) SetHeight

func (p *Person) SetHeight(height float32)

*

  • 针对于某个结构体,定义其 其他属性的__set方法
  • @see
  • @param

func (*Person) SetInt

func (p *Person) SetInt(n int)

func (*Person) SetString

func (p *Person) SetString(s string)

func (*Person) SetWeight

func (p *Person) SetWeight(weight float32)

Jump to

Keyboard shortcuts

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