struction

package
v0.0.0-...-d5cdf10 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnnomyStruct

func AnnomyStruct()

func Older

func Older(p1, p2 people) (bool, int)

func Reflection

func Reflection()

func TestInterface

func TestInterface()

func TestStruct

func TestStruct()

Types

type Circle

type Circle struct {
	// contains filtered or unexported fields
}

type GoodStudent

type GoodStudent struct {
	Student
	// contains filtered or unexported fields
}

type Human

type Human struct {
	Name   string
	Age    int
	Weight int
}

func NewHuman

func NewHuman(name string, age int, weight int) *Human

func (Human) SayHi

func (h Human) SayHi()

Human 实现 Man接口

func (Human) Sing

func (h Human) Sing(s string)

Human 实现 Man接口

type Man

type Man interface {
	SayHi()
	Sing(s string)
}

type Rectangle

type Rectangle struct {
	// contains filtered or unexported fields
}

type Student

type Student struct {
	Human // 匿名字段,那么默认Student就包含了Human的所有字段
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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