ref

package
v0.0.0-...-9d91cd3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DuckDance

func DuckDance(duck IDuck)

DuckDance .

func Test1

func Test1()

Test1 方法和类型的反射 反射是通过检查一个接口的值,变量首先被转换成空接口。

func Test2

func Test2()

Test2 接口与动态类型

Types

type Bird

type Bird struct {
}

Bird .

func (*Bird) Quack

func (b *Bird) Quack()

Quack .

func (*Bird) Walk

func (b *Bird) Walk()

Walk .

type IDuck

type IDuck interface {
	Quack()
	Walk()
}

IDuck .

Jump to

Keyboard shortcuts

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