initial

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package inital contains initial code for the celeritas project

Index

Constants

View Source
const (
	English = "english"
	Spanish = "spanish"
	French  = "french"
	German  = "german"
	Italian = "italian"
)

Variables

This section is empty.

Functions

func Add

func Add(numbers ...int) int

Add takes in an arbitrary number of integers and returns the sum

func Divide

func Divide(numbers ...int) int

Divide takes in an arbitrary number of integers and returns the quotient

func Maths

func Maths(operation Operation, numbers ...int) int

Maths takes in an arbitrary number of integers and the math operation to perform and returns the result

func Modulus

func Modulus(numbers ...int) int

Modulus takes in an arbitrary number of integers and returns the remainder

func Multiply

func Multiply(numbers ...int) int

Multiply takes in an arbitrary number of integers and returns the product

func SayHello

func SayHello(name, language string) string

SayHello takes in a name and a language and returns a greeting

func Subtract

func Subtract(numbers ...int) int

Subtract takes in an arbitrary number of integers and returns the difference

func TestFunc

func TestFunc(a, b int) int

TestFunc is a test function that adds two numbers with overflow protection

Types

type Operation

type Operation int

Operation represents a mathematical operation

const (
	OpAdd Operation = iota
	OpSubtract
	OpMultiply
	OpDivide
	OpModulus
	OpInvalid Operation = -1 // Explicit invalid operation
)

func (Operation) String

func (op Operation) String() string

Jump to

Keyboard shortcuts

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