oop

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintName

func PrintName(s Stringable)

Types

type China

type China struct {
	WithName
}

func (China) ToString

func (c China) ToString() string

type Japan

type Japan struct {
	WithName
}

func (Japan) ToString

func (j Japan) ToString() string

type Printable

type Printable interface {
	PrintName()
}

type Shape

type Shape interface {
	Sides() int
	Area() int
}

type Square

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

func (*Square) Area

func (s *Square) Area() int

func (*Square) Sides

func (s *Square) Sides() int

type Stringable

type Stringable interface {
	ToString() string
}

type WithName

type WithName struct {
	Name string
}

func (WithName) PrintName

func (w WithName) PrintName()

Jump to

Keyboard shortcuts

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