opers

package
v0.0.0-...-6ae0033 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a, b interface{}) (interface{}, error)

Add `a + b` Supports:

  • int
  • float64
  • string
  • []interface{}
  • map[string]interface{}
  • fmt.Stringer
  • faces.Add
  • faces.Int
  • faces.Float
  • faces.Slice
  • faces.Map

func Divide

func Divide(a, b interface{}) (interface{}, error)

Divide attempts to "divide" type `b` from type `a`. Supports:

  • int
  • float64
  • faces.Divide
  • faces.Float
  • faces.Int

func Equal

func Equal(a, b interface{}) (bool, error)

Equal `a == b` Supports:

  • faces.Equal
  • github.com/google/go-cmp/cmp

func GreaterThan

func GreaterThan(a, b interface{}) (bool, error)

GreaterThan `a < b` Supports:

  • int
  • float64
  • string
  • []interface{}
  • fmt.Stringer
  • faces.Add
  • faces.Int
  • faces.Float
  • faces.Slice

func GreaterThanEqualTo

func GreaterThanEqualTo(a, b interface{}) (bool, error)

GreaterThanEqualTo `a <= b` Supports:

  • int
  • float64
  • string
  • []interface{}
  • fmt.Stringer
  • faces.Add
  • faces.Int
  • faces.Float
  • faces.Slice

func LessThan

func LessThan(a, b interface{}) (bool, error)

LessThan `a < b` Supports:

  • int
  • float64
  • string
  • []interface{}
  • fmt.Stringer
  • faces.Add
  • faces.Int
  • faces.Float
  • faces.Slice

func LessThanEqualTo

func LessThanEqualTo(a, b interface{}) (bool, error)

LessThanEqualTo `a <= b` Supports:

  • int
  • float64
  • string
  • []interface{}
  • fmt.Stringer
  • faces.Add
  • faces.Int
  • faces.Float
  • faces.Slice

func Match

func Match(i interface{}, pattern string) (bool, error)

Match will attempt to match the given regex pattern against the given type. Supports:

  • string
  • int
  • float64
  • bool
  • fmt.Stringer
  • faces.Match
  • faces.Int
  • faces.Float
  • faces.Bool

func Modulus

func Modulus(a, b interface{}) (int, error)

Modulus attempts to take the "modulus" of type `a` with type `b`. Supports:

  • int
  • faces.Modulus
  • faces.Int

func Multiply

func Multiply(a, b interface{}) (interface{}, error)

Multiply attempts to "multiply" type `a` with type `b`. Supports:

  • int
  • float64
  • faces.Multiply
  • faces.Float
  • faces.Int

func NotEqual

func NotEqual(a, b interface{}) (bool, error)

NotEqual `a == b` Supports:

  • faces.NotEqual
  • github.com/google/go-cmp/cmp

func Sub

func Sub(a, b interface{}) (interface{}, error)

Sub `a - b` Supports:

  • int
  • float64
  • map[string]interface{}
  • faces.Sub
  • faces.Float
  • faces.Int
  • faces.Map

Types

This section is empty.

Directories

Path Synopsis
internal
add
gt
gte
lt
lte
ne
sub

Jump to

Keyboard shortcuts

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