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 ¶
func (s ArithmeticServiceString) Add(a, b string) string
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 ¶
ServiceMetricMath Define a service interface
Click to show internal directories.
Click to hide internal directories.