cases

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Drink

type Drink interface {
	Water()
}

func NewPersonDrink

func NewPersonDrink(eating Eat[int]) Drink

type Eat

type Eat[T any] interface {
	Egg(T)
}

func NewPersonEat

func NewPersonEat[T any]() Eat[T]

type Person

type Person struct {
	di.In

	Eating   Eat[int]
	Drinking Drink
}

func (*Person) Show

func (p *Person) Show()

type Person2

type Person2 struct {
	di.In

	Eating   Eat[string]
	Drinking Drink
}

func (*Person2) Show

func (p *Person2) Show()

type Person3

type Person3 struct {
	di.In

	Eating   Eat[string]
	Drinking Drink `name:"ddd"`
}

func (*Person3) Show

func (p *Person3) Show()

type PersonDrink

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

func (*PersonDrink) Water

func (p *PersonDrink) Water()

type PersonEat

type PersonEat[T any] struct {
}

func (*PersonEat[T]) Egg

func (p *PersonEat[T]) Egg(something T)

Jump to

Keyboard shortcuts

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