composition

package
v0.0.0-...-eb200bf Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParentField

func GetParentField(p Parent) int

func Swim

func Swim()

Types

type Animal

type Animal struct{}

func (*Animal) Eat

func (r *Animal) Eat()

type Athlete

type Athlete struct{}

func (*Athlete) Train

func (a *Athlete) Train()

type CompositeSwimmerA

type CompositeSwimmerA struct {
	MyAthlete Athlete
	MySwim    *func()
}

type CompositeSwimmerB

type CompositeSwimmerB struct {
	Trainer
	Swimmer
}

type Parent

type Parent struct {
	SomeField int
}

type Shark

type Shark struct {
	Animal
	Swim func()
}

type Son

type Son struct {
	P Parent
}

type Swimmer

type Swimmer interface {
	Swim()
}

type SwimmerImplementor

type SwimmerImplementor struct{}

func (*SwimmerImplementor) Swim

func (s *SwimmerImplementor) Swim()

type Trainer

type Trainer interface {
	Train()
}

type Tree

type Tree struct {
	LeafValue int
	Right     *Tree
	Left      *Tree
}

Jump to

Keyboard shortcuts

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