Documentation
¶
Index ¶
- type Engine
- func (e *Engine) Add(x, y float64) (*float64, error)
- func (e *Engine) Div(x, y float64) (*float64, error)
- func (e *Engine) GetNumOperands() int
- func (e *Engine) GetValidOperators() []string
- func (e *Engine) Mult(x, y float64) (*float64, error)
- func (e *Engine) ProcessOperation(operation Operation) (*string, error)
- func (e *Engine) Sub(x, y float64) (*float64, error)
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the mathematical logic part of the calculator.
func (*Engine) GetNumOperands ¶
GetNumOperands returns the expected number of operands that the engine can process.
func (*Engine) GetValidOperators ¶
GetValidOperators returns a slice of the valid operations that the engine accepts.
func (*Engine) ProcessOperation ¶
ProcessOperation processes a given operation and invokes the result formatter
Click to show internal directories.
Click to hide internal directories.