service

package
v0.0.0-...-fb1b0f6 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArithmeticServiceMath

type ArithmeticServiceMath struct {
}

ArithmeticServiceMath implement ServiceMetricMath interface

func (ArithmeticServiceMath) Add

func (s ArithmeticServiceMath) Add(a, b int) int

Add implement Add method

func (ArithmeticServiceMath) Divide

func (s ArithmeticServiceMath) Divide(a, b int) (int, error)

Divide implement Divide method

func (ArithmeticServiceMath) Multiply

func (s ArithmeticServiceMath) Multiply(a, b int) int

Multiply implement Multiply method

func (ArithmeticServiceMath) Subtract

func (s ArithmeticServiceMath) Subtract(a, b int) int

Subtract implement Subtract method

type ArithmeticServiceString

type ArithmeticServiceString struct {
}

ArithmeticServiceMath implement ServiceMetricMath interface

func (ArithmeticServiceString) Add

Add implement Add method

type ServiceMetricMath

type ServiceMetricMath interface {

	// Add calculate a+b
	Add(a, b int) int

	// Subtract calculate a-b
	Subtract(a, b int) int

	// Multiply calculate a*b
	Multiply(a, b int) int

	// Divide calculate a/b
	Divide(a, b int) (int, error)
}

ServiceMetricMath Define a service interface

type ServiceMetricString

type ServiceMetricString interface {

	// Add calculate a+b
	Add(a, b string) string
}

ServiceMetricMath Define a service interface

Jump to

Keyboard shortcuts

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