safety

package module
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: GPL-3.0 Imports: 1 Imported by: 3

README

safety

Yum

Go Report Card License

What is this?

This Go module provides some thread-safe utilities.

How to install

Open a terminal and run the following:

$ go get -u github.com/mjwhitta/safety

Usage

package main

import (
    hl "github.com/mjwhitta/hilighter"
    "github.com/mjwhitta/safety"
)

func main() {
    var m *safety.Map = safety.NewMap()
    var s *safety.Set = safety.NewSet()
    var sl *safety.Slice = safety.NewSlice()

    // Maps
    m.Put("a", "asdf")
    m.Put("b", "blah")
    m.Put("s", "stop")
    m.Put("t", "test")

    m.Range(
        func(k, v any) bool {
            switch v.(string) {
            case "stop":
                return true
            }

            hl.Printf("%s = %s\n", k.(string), v.(string))
            return false
        },
    )

    hl.Println(m.Keys())

    // Sets
    s.Add("asdf")
    s.Add("blah")
    s.Add("stop")
    s.Add("test")

    s.Range(
        func(entry any) bool {
            switch entry.(string) {
            case "stop":
                return true
            }

            hl.Printf("Set includes: %s\n", entry.(string))
            return false
        },
    )

    hl.Println(s.Get())

    // Slices
    sl.Append("asdf")
    sl.Append("blah")
    sl.Append("stop")
    sl.Append("test")

    sl.Range(
        func(i int, v any) bool {
            switch v.(string) {
            case "stop":
                return true
            }

            hl.Printf("Slice %d: %s\n", i, v.(string))
            return false
        },
    )

    hl.Println(sl.Get(0))
}

Documentation

Overview

Code generated by scripts/generate_go_funcs; DO NOT EDIT.

Index

Constants

View Source
const Version string = "1.11.5"

Version is the package version.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Bool is a thread-safe bool implementation.

func NewBool

func NewBool() *Bool

NewBool will return a pointer to a new Bool instance.

func (*Bool) EqualSet

func (p *Bool) EqualSet(expected bool, val bool) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Bool) Get

func (p *Bool) Get() bool

Get will return the current value.

func (*Bool) NotEqualSet

func (p *Bool) NotEqualSet(expected bool, val bool) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Bool) Set

func (p *Bool) Set(val bool)

Set will set the current value.

func (*Bool) UnsafeSet

func (p *Bool) UnsafeSet(val bool)

UnsafeSet will set the current value, with no Lock.

type Float32

type Float32 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Float32 is a thread-safe float32 implementation.

func NewFloat32

func NewFloat32() *Float32

NewFloat32 will return a pointer to a new Float32 instance.

func (*Float32) Add

func (p *Float32) Add(value float32) float32

Add will add the value and return the new value.

func (*Float32) Dec

func (p *Float32) Dec() float32

Dec will decrement the current value by 1 and return the new value.

func (*Float32) EqualSet

func (p *Float32) EqualSet(expected float32, val float32) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) Get

func (p *Float32) Get() float32

Get will return the current value.

func (*Float32) GreaterAdd

func (p *Float32) GreaterAdd(expected float32, val float32) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterDec

func (p *Float32) GreaterDec(expected float32) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterEqualAdd

func (p *Float32) GreaterEqualAdd(expected float32, val float32) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterEqualDec

func (p *Float32) GreaterEqualDec(expected float32) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterEqualInc

func (p *Float32) GreaterEqualInc(expected float32) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterEqualSet

func (p *Float32) GreaterEqualSet(expected float32, val float32) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterEqualSub

func (p *Float32) GreaterEqualSub(expected float32, val float32) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterInc

func (p *Float32) GreaterInc(expected float32) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) GreaterSub

func (p *Float32) GreaterSub(expected float32, val float32) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) Inc

func (p *Float32) Inc() float32

Inc will increment the current value by 1 and return the new value.

func (*Float32) LessAdd

func (p *Float32) LessAdd(expected float32, val float32) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessDec

func (p *Float32) LessDec(expected float32) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessEqualAdd

func (p *Float32) LessEqualAdd(expected float32, val float32) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessEqualDec

func (p *Float32) LessEqualDec(expected float32) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessEqualInc

func (p *Float32) LessEqualInc(expected float32) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessEqualSet

func (p *Float32) LessEqualSet(expected float32, val float32) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessEqualSub

func (p *Float32) LessEqualSub(expected float32, val float32) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessInc

func (p *Float32) LessInc(expected float32) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) LessSub

func (p *Float32) LessSub(expected float32, val float32) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) NotEqualSet

func (p *Float32) NotEqualSet(expected float32, val float32) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float32) Set

func (p *Float32) Set(val float32)

Set will set the current value.

func (*Float32) Sub

func (p *Float32) Sub(value float32) float32

Sub will subtract the value and return the new value.

func (*Float32) UnsafeAdd

func (p *Float32) UnsafeAdd(value float32) float32

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Float32) UnsafeDec

func (p *Float32) UnsafeDec() float32

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Float32) UnsafeInc

func (p *Float32) UnsafeInc() float32

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Float32) UnsafeSet

func (p *Float32) UnsafeSet(val float32)

UnsafeSet will set the current value, with no Lock.

func (*Float32) UnsafeSub

func (p *Float32) UnsafeSub(value float32) float32

UnsafeSub will subtract the value and return the new value, with no Lock.

type Float64

type Float64 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Float64 is a thread-safe float64 implementation.

func NewFloat64

func NewFloat64() *Float64

NewFloat64 will return a pointer to a new Float64 instance.

func (*Float64) Add

func (p *Float64) Add(value float64) float64

Add will add the value and return the new value.

func (*Float64) Dec

func (p *Float64) Dec() float64

Dec will decrement the current value by 1 and return the new value.

func (*Float64) EqualSet

func (p *Float64) EqualSet(expected float64, val float64) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) Get

func (p *Float64) Get() float64

Get will return the current value.

func (*Float64) GreaterAdd

func (p *Float64) GreaterAdd(expected float64, val float64) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterDec

func (p *Float64) GreaterDec(expected float64) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterEqualAdd

func (p *Float64) GreaterEqualAdd(expected float64, val float64) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterEqualDec

func (p *Float64) GreaterEqualDec(expected float64) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterEqualInc

func (p *Float64) GreaterEqualInc(expected float64) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterEqualSet

func (p *Float64) GreaterEqualSet(expected float64, val float64) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterEqualSub

func (p *Float64) GreaterEqualSub(expected float64, val float64) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterInc

func (p *Float64) GreaterInc(expected float64) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) GreaterSub

func (p *Float64) GreaterSub(expected float64, val float64) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) Inc

func (p *Float64) Inc() float64

Inc will increment the current value by 1 and return the new value.

func (*Float64) LessAdd

func (p *Float64) LessAdd(expected float64, val float64) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessDec

func (p *Float64) LessDec(expected float64) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessEqualAdd

func (p *Float64) LessEqualAdd(expected float64, val float64) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessEqualDec

func (p *Float64) LessEqualDec(expected float64) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessEqualInc

func (p *Float64) LessEqualInc(expected float64) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessEqualSet

func (p *Float64) LessEqualSet(expected float64, val float64) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessEqualSub

func (p *Float64) LessEqualSub(expected float64, val float64) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessInc

func (p *Float64) LessInc(expected float64) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) LessSub

func (p *Float64) LessSub(expected float64, val float64) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) NotEqualSet

func (p *Float64) NotEqualSet(expected float64, val float64) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Float64) Set

func (p *Float64) Set(val float64)

Set will set the current value.

func (*Float64) Sub

func (p *Float64) Sub(value float64) float64

Sub will subtract the value and return the new value.

func (*Float64) UnsafeAdd

func (p *Float64) UnsafeAdd(value float64) float64

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Float64) UnsafeDec

func (p *Float64) UnsafeDec() float64

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Float64) UnsafeInc

func (p *Float64) UnsafeInc() float64

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Float64) UnsafeSet

func (p *Float64) UnsafeSet(val float64)

UnsafeSet will set the current value, with no Lock.

func (*Float64) UnsafeSub

func (p *Float64) UnsafeSub(value float64) float64

UnsafeSub will subtract the value and return the new value, with no Lock.

type Int

type Int struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Int is a thread-safe int implementation.

func NewInt

func NewInt() *Int

NewInt will return a pointer to a new Int instance.

func (*Int) Add

func (p *Int) Add(value int) int

Add will add the value and return the new value.

func (*Int) Dec

func (p *Int) Dec() int

Dec will decrement the current value by 1 and return the new value.

func (*Int) EqualSet

func (p *Int) EqualSet(expected int, val int) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) Get

func (p *Int) Get() int

Get will return the current value.

func (*Int) GreaterAdd

func (p *Int) GreaterAdd(expected int, val int) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterDec

func (p *Int) GreaterDec(expected int) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterEqualAdd

func (p *Int) GreaterEqualAdd(expected int, val int) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterEqualDec

func (p *Int) GreaterEqualDec(expected int) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterEqualInc

func (p *Int) GreaterEqualInc(expected int) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterEqualSet

func (p *Int) GreaterEqualSet(expected int, val int) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterEqualSub

func (p *Int) GreaterEqualSub(expected int, val int) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterInc

func (p *Int) GreaterInc(expected int) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) GreaterSub

func (p *Int) GreaterSub(expected int, val int) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) Inc

func (p *Int) Inc() int

Inc will increment the current value by 1 and return the new value.

func (*Int) LessAdd

func (p *Int) LessAdd(expected int, val int) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessDec

func (p *Int) LessDec(expected int) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessEqualAdd

func (p *Int) LessEqualAdd(expected int, val int) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessEqualDec

func (p *Int) LessEqualDec(expected int) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessEqualInc

func (p *Int) LessEqualInc(expected int) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessEqualSet

func (p *Int) LessEqualSet(expected int, val int) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessEqualSub

func (p *Int) LessEqualSub(expected int, val int) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessInc

func (p *Int) LessInc(expected int) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) LessSub

func (p *Int) LessSub(expected int, val int) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) NotEqualSet

func (p *Int) NotEqualSet(expected int, val int) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int) Set

func (p *Int) Set(val int)

Set will set the current value.

func (*Int) Sub

func (p *Int) Sub(value int) int

Sub will subtract the value and return the new value.

func (*Int) UnsafeAdd

func (p *Int) UnsafeAdd(value int) int

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Int) UnsafeDec

func (p *Int) UnsafeDec() int

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Int) UnsafeInc

func (p *Int) UnsafeInc() int

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Int) UnsafeSet

func (p *Int) UnsafeSet(val int)

UnsafeSet will set the current value, with no Lock.

func (*Int) UnsafeSub

func (p *Int) UnsafeSub(value int) int

UnsafeSub will subtract the value and return the new value, with no Lock.

type Int16

type Int16 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Int16 is a thread-safe int16 implementation.

func NewInt16

func NewInt16() *Int16

NewInt16 will return a pointer to a new Int16 instance.

func (*Int16) Add

func (p *Int16) Add(value int16) int16

Add will add the value and return the new value.

func (*Int16) Dec

func (p *Int16) Dec() int16

Dec will decrement the current value by 1 and return the new value.

func (*Int16) EqualSet

func (p *Int16) EqualSet(expected int16, val int16) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) Get

func (p *Int16) Get() int16

Get will return the current value.

func (*Int16) GreaterAdd

func (p *Int16) GreaterAdd(expected int16, val int16) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterDec

func (p *Int16) GreaterDec(expected int16) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterEqualAdd

func (p *Int16) GreaterEqualAdd(expected int16, val int16) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterEqualDec

func (p *Int16) GreaterEqualDec(expected int16) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterEqualInc

func (p *Int16) GreaterEqualInc(expected int16) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterEqualSet

func (p *Int16) GreaterEqualSet(expected int16, val int16) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterEqualSub

func (p *Int16) GreaterEqualSub(expected int16, val int16) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterInc

func (p *Int16) GreaterInc(expected int16) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) GreaterSub

func (p *Int16) GreaterSub(expected int16, val int16) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) Inc

func (p *Int16) Inc() int16

Inc will increment the current value by 1 and return the new value.

func (*Int16) LessAdd

func (p *Int16) LessAdd(expected int16, val int16) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessDec

func (p *Int16) LessDec(expected int16) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessEqualAdd

func (p *Int16) LessEqualAdd(expected int16, val int16) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessEqualDec

func (p *Int16) LessEqualDec(expected int16) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessEqualInc

func (p *Int16) LessEqualInc(expected int16) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessEqualSet

func (p *Int16) LessEqualSet(expected int16, val int16) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessEqualSub

func (p *Int16) LessEqualSub(expected int16, val int16) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessInc

func (p *Int16) LessInc(expected int16) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) LessSub

func (p *Int16) LessSub(expected int16, val int16) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) NotEqualSet

func (p *Int16) NotEqualSet(expected int16, val int16) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int16) Set

func (p *Int16) Set(val int16)

Set will set the current value.

func (*Int16) Sub

func (p *Int16) Sub(value int16) int16

Sub will subtract the value and return the new value.

func (*Int16) UnsafeAdd

func (p *Int16) UnsafeAdd(value int16) int16

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Int16) UnsafeDec

func (p *Int16) UnsafeDec() int16

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Int16) UnsafeInc

func (p *Int16) UnsafeInc() int16

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Int16) UnsafeSet

func (p *Int16) UnsafeSet(val int16)

UnsafeSet will set the current value, with no Lock.

func (*Int16) UnsafeSub

func (p *Int16) UnsafeSub(value int16) int16

UnsafeSub will subtract the value and return the new value, with no Lock.

type Int32

type Int32 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Int32 is a thread-safe int32 implementation.

func NewInt32

func NewInt32() *Int32

NewInt32 will return a pointer to a new Int32 instance.

func (*Int32) Add

func (p *Int32) Add(value int32) int32

Add will add the value and return the new value.

func (*Int32) Dec

func (p *Int32) Dec() int32

Dec will decrement the current value by 1 and return the new value.

func (*Int32) EqualSet

func (p *Int32) EqualSet(expected int32, val int32) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) Get

func (p *Int32) Get() int32

Get will return the current value.

func (*Int32) GreaterAdd

func (p *Int32) GreaterAdd(expected int32, val int32) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterDec

func (p *Int32) GreaterDec(expected int32) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterEqualAdd

func (p *Int32) GreaterEqualAdd(expected int32, val int32) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterEqualDec

func (p *Int32) GreaterEqualDec(expected int32) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterEqualInc

func (p *Int32) GreaterEqualInc(expected int32) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterEqualSet

func (p *Int32) GreaterEqualSet(expected int32, val int32) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterEqualSub

func (p *Int32) GreaterEqualSub(expected int32, val int32) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterInc

func (p *Int32) GreaterInc(expected int32) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) GreaterSub

func (p *Int32) GreaterSub(expected int32, val int32) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) Inc

func (p *Int32) Inc() int32

Inc will increment the current value by 1 and return the new value.

func (*Int32) LessAdd

func (p *Int32) LessAdd(expected int32, val int32) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessDec

func (p *Int32) LessDec(expected int32) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessEqualAdd

func (p *Int32) LessEqualAdd(expected int32, val int32) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessEqualDec

func (p *Int32) LessEqualDec(expected int32) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessEqualInc

func (p *Int32) LessEqualInc(expected int32) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessEqualSet

func (p *Int32) LessEqualSet(expected int32, val int32) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessEqualSub

func (p *Int32) LessEqualSub(expected int32, val int32) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessInc

func (p *Int32) LessInc(expected int32) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) LessSub

func (p *Int32) LessSub(expected int32, val int32) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) NotEqualSet

func (p *Int32) NotEqualSet(expected int32, val int32) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int32) Set

func (p *Int32) Set(val int32)

Set will set the current value.

func (*Int32) Sub

func (p *Int32) Sub(value int32) int32

Sub will subtract the value and return the new value.

func (*Int32) UnsafeAdd

func (p *Int32) UnsafeAdd(value int32) int32

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Int32) UnsafeDec

func (p *Int32) UnsafeDec() int32

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Int32) UnsafeInc

func (p *Int32) UnsafeInc() int32

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Int32) UnsafeSet

func (p *Int32) UnsafeSet(val int32)

UnsafeSet will set the current value, with no Lock.

func (*Int32) UnsafeSub

func (p *Int32) UnsafeSub(value int32) int32

UnsafeSub will subtract the value and return the new value, with no Lock.

type Int64

type Int64 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Int64 is a thread-safe int64 implementation.

func NewInt64

func NewInt64() *Int64

NewInt64 will return a pointer to a new Int64 instance.

func (*Int64) Add

func (p *Int64) Add(value int64) int64

Add will add the value and return the new value.

func (*Int64) Dec

func (p *Int64) Dec() int64

Dec will decrement the current value by 1 and return the new value.

func (*Int64) EqualSet

func (p *Int64) EqualSet(expected int64, val int64) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) Get

func (p *Int64) Get() int64

Get will return the current value.

func (*Int64) GreaterAdd

func (p *Int64) GreaterAdd(expected int64, val int64) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterDec

func (p *Int64) GreaterDec(expected int64) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterEqualAdd

func (p *Int64) GreaterEqualAdd(expected int64, val int64) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterEqualDec

func (p *Int64) GreaterEqualDec(expected int64) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterEqualInc

func (p *Int64) GreaterEqualInc(expected int64) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterEqualSet

func (p *Int64) GreaterEqualSet(expected int64, val int64) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterEqualSub

func (p *Int64) GreaterEqualSub(expected int64, val int64) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterInc

func (p *Int64) GreaterInc(expected int64) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) GreaterSub

func (p *Int64) GreaterSub(expected int64, val int64) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) Inc

func (p *Int64) Inc() int64

Inc will increment the current value by 1 and return the new value.

func (*Int64) LessAdd

func (p *Int64) LessAdd(expected int64, val int64) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessDec

func (p *Int64) LessDec(expected int64) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessEqualAdd

func (p *Int64) LessEqualAdd(expected int64, val int64) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessEqualDec

func (p *Int64) LessEqualDec(expected int64) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessEqualInc

func (p *Int64) LessEqualInc(expected int64) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessEqualSet

func (p *Int64) LessEqualSet(expected int64, val int64) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessEqualSub

func (p *Int64) LessEqualSub(expected int64, val int64) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessInc

func (p *Int64) LessInc(expected int64) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) LessSub

func (p *Int64) LessSub(expected int64, val int64) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) NotEqualSet

func (p *Int64) NotEqualSet(expected int64, val int64) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int64) Set

func (p *Int64) Set(val int64)

Set will set the current value.

func (*Int64) Sub

func (p *Int64) Sub(value int64) int64

Sub will subtract the value and return the new value.

func (*Int64) UnsafeAdd

func (p *Int64) UnsafeAdd(value int64) int64

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Int64) UnsafeDec

func (p *Int64) UnsafeDec() int64

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Int64) UnsafeInc

func (p *Int64) UnsafeInc() int64

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Int64) UnsafeSet

func (p *Int64) UnsafeSet(val int64)

UnsafeSet will set the current value, with no Lock.

func (*Int64) UnsafeSub

func (p *Int64) UnsafeSub(value int64) int64

UnsafeSub will subtract the value and return the new value, with no Lock.

type Int8

type Int8 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Int8 is a thread-safe int8 implementation.

func NewInt8

func NewInt8() *Int8

NewInt8 will return a pointer to a new Int8 instance.

func (*Int8) Add

func (p *Int8) Add(value int8) int8

Add will add the value and return the new value.

func (*Int8) Dec

func (p *Int8) Dec() int8

Dec will decrement the current value by 1 and return the new value.

func (*Int8) EqualSet

func (p *Int8) EqualSet(expected int8, val int8) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) Get

func (p *Int8) Get() int8

Get will return the current value.

func (*Int8) GreaterAdd

func (p *Int8) GreaterAdd(expected int8, val int8) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterDec

func (p *Int8) GreaterDec(expected int8) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterEqualAdd

func (p *Int8) GreaterEqualAdd(expected int8, val int8) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterEqualDec

func (p *Int8) GreaterEqualDec(expected int8) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterEqualInc

func (p *Int8) GreaterEqualInc(expected int8) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterEqualSet

func (p *Int8) GreaterEqualSet(expected int8, val int8) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterEqualSub

func (p *Int8) GreaterEqualSub(expected int8, val int8) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterInc

func (p *Int8) GreaterInc(expected int8) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) GreaterSub

func (p *Int8) GreaterSub(expected int8, val int8) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) Inc

func (p *Int8) Inc() int8

Inc will increment the current value by 1 and return the new value.

func (*Int8) LessAdd

func (p *Int8) LessAdd(expected int8, val int8) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessDec

func (p *Int8) LessDec(expected int8) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessEqualAdd

func (p *Int8) LessEqualAdd(expected int8, val int8) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessEqualDec

func (p *Int8) LessEqualDec(expected int8) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessEqualInc

func (p *Int8) LessEqualInc(expected int8) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessEqualSet

func (p *Int8) LessEqualSet(expected int8, val int8) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessEqualSub

func (p *Int8) LessEqualSub(expected int8, val int8) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessInc

func (p *Int8) LessInc(expected int8) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) LessSub

func (p *Int8) LessSub(expected int8, val int8) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) NotEqualSet

func (p *Int8) NotEqualSet(expected int8, val int8) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Int8) Set

func (p *Int8) Set(val int8)

Set will set the current value.

func (*Int8) Sub

func (p *Int8) Sub(value int8) int8

Sub will subtract the value and return the new value.

func (*Int8) UnsafeAdd

func (p *Int8) UnsafeAdd(value int8) int8

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Int8) UnsafeDec

func (p *Int8) UnsafeDec() int8

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Int8) UnsafeInc

func (p *Int8) UnsafeInc() int8

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Int8) UnsafeSet

func (p *Int8) UnsafeSet(val int8)

UnsafeSet will set the current value, with no Lock.

func (*Int8) UnsafeSub

func (p *Int8) UnsafeSub(value int8) int8

UnsafeSub will subtract the value and return the new value, with no Lock.

type Map

type Map struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Map is a thread-safe map[any]any implementation.

func NewMap

func NewMap() *Map

NewMap will return a pointer to a new Map instance.

func (*Map) Clear

func (m *Map) Clear()

Clear will delete all map entries

func (*Map) Delete

func (m *Map) Delete(k any) (v any)

Delete will delete a map entry and return the deleted entry.

func (*Map) Get

func (m *Map) Get(k any) (v any, ok bool)

Get will return a map entry.

func (*Map) Keys

func (m *Map) Keys() (keys []any)

Keys will return a snapshot of the valid keys. There is no guarantee that the keys will remain valid for any amount of time.

func (*Map) Put

func (m *Map) Put(k any, v any)

Put will store a key/value pair.

func (*Map) PutIfNew

func (m *Map) PutIfNew(k any, v any) bool

PutIfNew will store a key/value pair, so long as the key doesn't already exist.

func (*Map) Range

func (m *Map) Range(f func(key, val any) bool)

Range will loop over the map and run the specified function for each entry. The return value determines whether or not to break the loop. You should not add or delete entries within Range, and you should avoid calling other Map functions or you may cause deadlock. Range should be safe to nest for any read operations.

func (*Map) RangeChange

func (m *Map) RangeChange(f func(key, val any) (any, bool))

RangeChange will loop over the map and run the specified function for each entry, storing the first return value as the new entry value. The second return value determines whether or not to break the loop. You should not add or delete entries within RangeChange, and you should avoid calling other Map functions or you may cause deadlock.

type Set

type Set struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Set is a thread-safe set[any]struct{} implementation.

func NewSet

func NewSet() *Set

NewSet will return a pointer to a new Set instance.

func (*Set) Add

func (m *Set) Add(entry any)

Add will put a new entry into the set.

func (*Set) Clear

func (m *Set) Clear()

Clear will delete all set entries

func (*Set) Delete

func (m *Set) Delete(entry any) (ok bool)

Delete will delete a set entry.

func (*Set) Get

func (m *Set) Get() (entries []any)

Get will return a snapshot of the set. There is no guarantee that the items will remain in the set for any amount of time.

func (*Set) Has

func (m *Set) Has(entry any) (ok bool)

Has will return whether or not the provided entry exists.

func (*Set) Range

func (m *Set) Range(f func(entry any) bool)

Range will loop over the set and run the specified function for each entry. The return value determines whether or not to break the loop. You should not add or delete entries within Range, and you should avoid calling other Set functions or you may cause deadlock. Range should be safe to nest for any read operations.

type Slice

type Slice struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Slice is a thread-safe []any implementation. Order is not guaranteed.

func NewSlice

func NewSlice() *Slice

NewSlice will return a pointer to a new Slice instance.

func (*Slice) Append

func (a *Slice) Append(v any)

Append will append a new entry to the slice.

func (*Slice) Clear

func (a *Slice) Clear()

Clear will delete all slice entries.

func (*Slice) Delete

func (a *Slice) Delete(i int) (v any)

Delete will delete a slice entry and return the deleted entry.

func (*Slice) Get

func (a *Slice) Get(i int) (v any)

Get will return a slice entry.

func (*Slice) Length

func (a *Slice) Length() int

Length will return the length of the slice. There is no guarantee that it will remain accurate for any amount of time.

func (*Slice) Range

func (a *Slice) Range(f func(idx int, val any) bool)

Range will loop over the slice and run the specified function for each entry. The return value determines whether or not to break the loop. You should not add or delete entries within Range, and you should avoid calling other Slice functions or you may cause deadlock. Range should be safe to nest for any read operations.

func (*Slice) RangeChange

func (a *Slice) RangeChange(f func(idx int, val any) (any, bool))

RangeChange will loop over the slice and run the specified function for each entry, storing the first return value as the new entry value. The second return value determines whether or not to break the loop. You should not add or delete entries within RangeChange, and you should avoid calling other Slice functions or you may cause deadlock. Range should be safe to nest for any read operations.

type String

type String struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

String is a thread-safe string implementation.

func NewString

func NewString() *String

NewString will return a pointer to a new String instance.

func (*String) EqualSet

func (p *String) EqualSet(expected string, val string) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*String) Get

func (p *String) Get() string

Get will return the current value.

func (*String) GreaterEqualSet

func (p *String) GreaterEqualSet(expected string, val string) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*String) LessEqualSet

func (p *String) LessEqualSet(expected string, val string) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*String) NotEqualSet

func (p *String) NotEqualSet(expected string, val string) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*String) Set

func (p *String) Set(val string)

Set will set the current value.

func (*String) UnsafeSet

func (p *String) UnsafeSet(val string)

UnsafeSet will set the current value, with no Lock.

type Uint

type Uint struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Uint is a thread-safe uint implementation.

func NewUint

func NewUint() *Uint

NewUint will return a pointer to a new Uint instance.

func (*Uint) Add

func (p *Uint) Add(value uint) uint

Add will add the value and return the new value.

func (*Uint) Dec

func (p *Uint) Dec() uint

Dec will decrement the current value by 1 and return the new value.

func (*Uint) EqualSet

func (p *Uint) EqualSet(expected uint, val uint) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) Get

func (p *Uint) Get() uint

Get will return the current value.

func (*Uint) GreaterAdd

func (p *Uint) GreaterAdd(expected uint, val uint) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterDec

func (p *Uint) GreaterDec(expected uint) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterEqualAdd

func (p *Uint) GreaterEqualAdd(expected uint, val uint) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterEqualDec

func (p *Uint) GreaterEqualDec(expected uint) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterEqualInc

func (p *Uint) GreaterEqualInc(expected uint) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterEqualSet

func (p *Uint) GreaterEqualSet(expected uint, val uint) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterEqualSub

func (p *Uint) GreaterEqualSub(expected uint, val uint) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterInc

func (p *Uint) GreaterInc(expected uint) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) GreaterSub

func (p *Uint) GreaterSub(expected uint, val uint) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) Inc

func (p *Uint) Inc() uint

Inc will increment the current value by 1 and return the new value.

func (*Uint) LessAdd

func (p *Uint) LessAdd(expected uint, val uint) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessDec

func (p *Uint) LessDec(expected uint) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessEqualAdd

func (p *Uint) LessEqualAdd(expected uint, val uint) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessEqualDec

func (p *Uint) LessEqualDec(expected uint) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessEqualInc

func (p *Uint) LessEqualInc(expected uint) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessEqualSet

func (p *Uint) LessEqualSet(expected uint, val uint) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessEqualSub

func (p *Uint) LessEqualSub(expected uint, val uint) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessInc

func (p *Uint) LessInc(expected uint) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) LessSub

func (p *Uint) LessSub(expected uint, val uint) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) NotEqualSet

func (p *Uint) NotEqualSet(expected uint, val uint) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint) Set

func (p *Uint) Set(val uint)

Set will set the current value.

func (*Uint) Sub

func (p *Uint) Sub(value uint) uint

Sub will subtract the value and return the new value.

func (*Uint) UnsafeAdd

func (p *Uint) UnsafeAdd(value uint) uint

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Uint) UnsafeDec

func (p *Uint) UnsafeDec() uint

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Uint) UnsafeInc

func (p *Uint) UnsafeInc() uint

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Uint) UnsafeSet

func (p *Uint) UnsafeSet(val uint)

UnsafeSet will set the current value, with no Lock.

func (*Uint) UnsafeSub

func (p *Uint) UnsafeSub(value uint) uint

UnsafeSub will subtract the value and return the new value, with no Lock.

type Uint16

type Uint16 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Uint16 is a thread-safe uint16 implementation.

func NewUint16

func NewUint16() *Uint16

NewUint16 will return a pointer to a new Uint16 instance.

func (*Uint16) Add

func (p *Uint16) Add(value uint16) uint16

Add will add the value and return the new value.

func (*Uint16) Dec

func (p *Uint16) Dec() uint16

Dec will decrement the current value by 1 and return the new value.

func (*Uint16) EqualSet

func (p *Uint16) EqualSet(expected uint16, val uint16) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) Get

func (p *Uint16) Get() uint16

Get will return the current value.

func (*Uint16) GreaterAdd

func (p *Uint16) GreaterAdd(expected uint16, val uint16) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterDec

func (p *Uint16) GreaterDec(expected uint16) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterEqualAdd

func (p *Uint16) GreaterEqualAdd(expected uint16, val uint16) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterEqualDec

func (p *Uint16) GreaterEqualDec(expected uint16) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterEqualInc

func (p *Uint16) GreaterEqualInc(expected uint16) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterEqualSet

func (p *Uint16) GreaterEqualSet(expected uint16, val uint16) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterEqualSub

func (p *Uint16) GreaterEqualSub(expected uint16, val uint16) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterInc

func (p *Uint16) GreaterInc(expected uint16) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) GreaterSub

func (p *Uint16) GreaterSub(expected uint16, val uint16) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) Inc

func (p *Uint16) Inc() uint16

Inc will increment the current value by 1 and return the new value.

func (*Uint16) LessAdd

func (p *Uint16) LessAdd(expected uint16, val uint16) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessDec

func (p *Uint16) LessDec(expected uint16) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessEqualAdd

func (p *Uint16) LessEqualAdd(expected uint16, val uint16) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessEqualDec

func (p *Uint16) LessEqualDec(expected uint16) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessEqualInc

func (p *Uint16) LessEqualInc(expected uint16) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessEqualSet

func (p *Uint16) LessEqualSet(expected uint16, val uint16) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessEqualSub

func (p *Uint16) LessEqualSub(expected uint16, val uint16) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessInc

func (p *Uint16) LessInc(expected uint16) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) LessSub

func (p *Uint16) LessSub(expected uint16, val uint16) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) NotEqualSet

func (p *Uint16) NotEqualSet(expected uint16, val uint16) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint16) Set

func (p *Uint16) Set(val uint16)

Set will set the current value.

func (*Uint16) Sub

func (p *Uint16) Sub(value uint16) uint16

Sub will subtract the value and return the new value.

func (*Uint16) UnsafeAdd

func (p *Uint16) UnsafeAdd(value uint16) uint16

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Uint16) UnsafeDec

func (p *Uint16) UnsafeDec() uint16

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Uint16) UnsafeInc

func (p *Uint16) UnsafeInc() uint16

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Uint16) UnsafeSet

func (p *Uint16) UnsafeSet(val uint16)

UnsafeSet will set the current value, with no Lock.

func (*Uint16) UnsafeSub

func (p *Uint16) UnsafeSub(value uint16) uint16

UnsafeSub will subtract the value and return the new value, with no Lock.

type Uint32

type Uint32 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Uint32 is a thread-safe uint32 implementation.

func NewUint32

func NewUint32() *Uint32

NewUint32 will return a pointer to a new Uint32 instance.

func (*Uint32) Add

func (p *Uint32) Add(value uint32) uint32

Add will add the value and return the new value.

func (*Uint32) Dec

func (p *Uint32) Dec() uint32

Dec will decrement the current value by 1 and return the new value.

func (*Uint32) EqualSet

func (p *Uint32) EqualSet(expected uint32, val uint32) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) Get

func (p *Uint32) Get() uint32

Get will return the current value.

func (*Uint32) GreaterAdd

func (p *Uint32) GreaterAdd(expected uint32, val uint32) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterDec

func (p *Uint32) GreaterDec(expected uint32) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterEqualAdd

func (p *Uint32) GreaterEqualAdd(expected uint32, val uint32) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterEqualDec

func (p *Uint32) GreaterEqualDec(expected uint32) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterEqualInc

func (p *Uint32) GreaterEqualInc(expected uint32) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterEqualSet

func (p *Uint32) GreaterEqualSet(expected uint32, val uint32) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterEqualSub

func (p *Uint32) GreaterEqualSub(expected uint32, val uint32) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterInc

func (p *Uint32) GreaterInc(expected uint32) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) GreaterSub

func (p *Uint32) GreaterSub(expected uint32, val uint32) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) Inc

func (p *Uint32) Inc() uint32

Inc will increment the current value by 1 and return the new value.

func (*Uint32) LessAdd

func (p *Uint32) LessAdd(expected uint32, val uint32) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessDec

func (p *Uint32) LessDec(expected uint32) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessEqualAdd

func (p *Uint32) LessEqualAdd(expected uint32, val uint32) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessEqualDec

func (p *Uint32) LessEqualDec(expected uint32) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessEqualInc

func (p *Uint32) LessEqualInc(expected uint32) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessEqualSet

func (p *Uint32) LessEqualSet(expected uint32, val uint32) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessEqualSub

func (p *Uint32) LessEqualSub(expected uint32, val uint32) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessInc

func (p *Uint32) LessInc(expected uint32) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) LessSub

func (p *Uint32) LessSub(expected uint32, val uint32) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) NotEqualSet

func (p *Uint32) NotEqualSet(expected uint32, val uint32) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint32) Set

func (p *Uint32) Set(val uint32)

Set will set the current value.

func (*Uint32) Sub

func (p *Uint32) Sub(value uint32) uint32

Sub will subtract the value and return the new value.

func (*Uint32) UnsafeAdd

func (p *Uint32) UnsafeAdd(value uint32) uint32

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Uint32) UnsafeDec

func (p *Uint32) UnsafeDec() uint32

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Uint32) UnsafeInc

func (p *Uint32) UnsafeInc() uint32

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Uint32) UnsafeSet

func (p *Uint32) UnsafeSet(val uint32)

UnsafeSet will set the current value, with no Lock.

func (*Uint32) UnsafeSub

func (p *Uint32) UnsafeSub(value uint32) uint32

UnsafeSub will subtract the value and return the new value, with no Lock.

type Uint64

type Uint64 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Uint64 is a thread-safe uint64 implementation.

func NewUint64

func NewUint64() *Uint64

NewUint64 will return a pointer to a new Uint64 instance.

func (*Uint64) Add

func (p *Uint64) Add(value uint64) uint64

Add will add the value and return the new value.

func (*Uint64) Dec

func (p *Uint64) Dec() uint64

Dec will decrement the current value by 1 and return the new value.

func (*Uint64) EqualSet

func (p *Uint64) EqualSet(expected uint64, val uint64) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) Get

func (p *Uint64) Get() uint64

Get will return the current value.

func (*Uint64) GreaterAdd

func (p *Uint64) GreaterAdd(expected uint64, val uint64) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterDec

func (p *Uint64) GreaterDec(expected uint64) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterEqualAdd

func (p *Uint64) GreaterEqualAdd(expected uint64, val uint64) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterEqualDec

func (p *Uint64) GreaterEqualDec(expected uint64) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterEqualInc

func (p *Uint64) GreaterEqualInc(expected uint64) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterEqualSet

func (p *Uint64) GreaterEqualSet(expected uint64, val uint64) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterEqualSub

func (p *Uint64) GreaterEqualSub(expected uint64, val uint64) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterInc

func (p *Uint64) GreaterInc(expected uint64) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) GreaterSub

func (p *Uint64) GreaterSub(expected uint64, val uint64) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) Inc

func (p *Uint64) Inc() uint64

Inc will increment the current value by 1 and return the new value.

func (*Uint64) LessAdd

func (p *Uint64) LessAdd(expected uint64, val uint64) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessDec

func (p *Uint64) LessDec(expected uint64) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessEqualAdd

func (p *Uint64) LessEqualAdd(expected uint64, val uint64) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessEqualDec

func (p *Uint64) LessEqualDec(expected uint64) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessEqualInc

func (p *Uint64) LessEqualInc(expected uint64) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessEqualSet

func (p *Uint64) LessEqualSet(expected uint64, val uint64) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessEqualSub

func (p *Uint64) LessEqualSub(expected uint64, val uint64) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessInc

func (p *Uint64) LessInc(expected uint64) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) LessSub

func (p *Uint64) LessSub(expected uint64, val uint64) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) NotEqualSet

func (p *Uint64) NotEqualSet(expected uint64, val uint64) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint64) Set

func (p *Uint64) Set(val uint64)

Set will set the current value.

func (*Uint64) Sub

func (p *Uint64) Sub(value uint64) uint64

Sub will subtract the value and return the new value.

func (*Uint64) UnsafeAdd

func (p *Uint64) UnsafeAdd(value uint64) uint64

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Uint64) UnsafeDec

func (p *Uint64) UnsafeDec() uint64

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Uint64) UnsafeInc

func (p *Uint64) UnsafeInc() uint64

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Uint64) UnsafeSet

func (p *Uint64) UnsafeSet(val uint64)

UnsafeSet will set the current value, with no Lock.

func (*Uint64) UnsafeSub

func (p *Uint64) UnsafeSub(value uint64) uint64

UnsafeSub will subtract the value and return the new value, with no Lock.

type Uint8

type Uint8 struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Uint8 is a thread-safe uint8 implementation.

func NewUint8

func NewUint8() *Uint8

NewUint8 will return a pointer to a new Uint8 instance.

func (*Uint8) Add

func (p *Uint8) Add(value uint8) uint8

Add will add the value and return the new value.

func (*Uint8) Dec

func (p *Uint8) Dec() uint8

Dec will decrement the current value by 1 and return the new value.

func (*Uint8) EqualSet

func (p *Uint8) EqualSet(expected uint8, val uint8) bool

EqualSet will check if the value is == the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) Get

func (p *Uint8) Get() uint8

Get will return the current value.

func (*Uint8) GreaterAdd

func (p *Uint8) GreaterAdd(expected uint8, val uint8) bool

GreaterAdd will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterDec

func (p *Uint8) GreaterDec(expected uint8) bool

GreaterDec will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterEqualAdd

func (p *Uint8) GreaterEqualAdd(expected uint8, val uint8) bool

GreaterEqualAdd will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterEqualDec

func (p *Uint8) GreaterEqualDec(expected uint8) bool

GreaterEqualDec will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterEqualInc

func (p *Uint8) GreaterEqualInc(expected uint8) bool

GreaterEqualInc will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterEqualSet

func (p *Uint8) GreaterEqualSet(expected uint8, val uint8) bool

GreaterEqualSet will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterEqualSub

func (p *Uint8) GreaterEqualSub(expected uint8, val uint8) bool

GreaterEqualSub will check if the value is >= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterInc

func (p *Uint8) GreaterInc(expected uint8) bool

GreaterInc will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) GreaterSub

func (p *Uint8) GreaterSub(expected uint8, val uint8) bool

GreaterSub will check if the value is > the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) Inc

func (p *Uint8) Inc() uint8

Inc will increment the current value by 1 and return the new value.

func (*Uint8) LessAdd

func (p *Uint8) LessAdd(expected uint8, val uint8) bool

LessAdd will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessDec

func (p *Uint8) LessDec(expected uint8) bool

LessDec will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessEqualAdd

func (p *Uint8) LessEqualAdd(expected uint8, val uint8) bool

LessEqualAdd will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessEqualDec

func (p *Uint8) LessEqualDec(expected uint8) bool

LessEqualDec will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessEqualInc

func (p *Uint8) LessEqualInc(expected uint8) bool

LessEqualInc will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessEqualSet

func (p *Uint8) LessEqualSet(expected uint8, val uint8) bool

LessEqualSet will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessEqualSub

func (p *Uint8) LessEqualSub(expected uint8, val uint8) bool

LessEqualSub will check if the value is <= the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessInc

func (p *Uint8) LessInc(expected uint8) bool

LessInc will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) LessSub

func (p *Uint8) LessSub(expected uint8, val uint8) bool

LessSub will check if the value is < the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) NotEqualSet

func (p *Uint8) NotEqualSet(expected uint8, val uint8) bool

NotEqualSet will check if the value is != the expected value. If it is, it will call the appropriate function and return true, otherwise it will simply return false.

func (*Uint8) Set

func (p *Uint8) Set(val uint8)

Set will set the current value.

func (*Uint8) Sub

func (p *Uint8) Sub(value uint8) uint8

Sub will subtract the value and return the new value.

func (*Uint8) UnsafeAdd

func (p *Uint8) UnsafeAdd(value uint8) uint8

UnsafeAdd will add the value and return the new value, with no Lock.

func (*Uint8) UnsafeDec

func (p *Uint8) UnsafeDec() uint8

UnsafeDec will decrement the current value by 1 and return the new value, with no Lock.

func (*Uint8) UnsafeInc

func (p *Uint8) UnsafeInc() uint8

UnsafeInc will increment the current value by 1 and return the new value, with no Lock.

func (*Uint8) UnsafeSet

func (p *Uint8) UnsafeSet(val uint8)

UnsafeSet will set the current value, with no Lock.

func (*Uint8) UnsafeSub

func (p *Uint8) UnsafeSub(value uint8) uint8

UnsafeSub will subtract the value and return the new value, with no Lock.

Jump to

Keyboard shortcuts

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