sample

package
v0.0.0-...-eb36113 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Person

type Person struct {
	Name string
	Age  int
}

简单工厂模式是最常用、最简单的。 它就是一个接受一些参数,然后返回 Person 实例的函数

func NewPerson

func NewPerson(name string, age int) *Person

func (Person) Greet

func (p Person) Greet()

Jump to

Keyboard shortcuts

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