gostack

package module
v0.0.0-...-72e0ab2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: MIT Imports: 4 Imported by: 5

README

gostack

Thread-safe stack data-structure for golang.

Reference

godoc or https://godoc.org/github.com/prasanths96/gostack

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	Push(v interface{})
	Pop() (interface{}, error)
	Read() (interface{}, error)
	Size() int
	PopBool() (bool, error)
	PopByte() (byte, error)
	PopComplex64() (complex64, error)
	PopComplex128() (complex128, error)
	PopError() (error, error)
	//Floats
	PopFloat32() (float32, error)
	PopFloat64() (float64, error)
	// Ints
	PopInt() (int, error)
	PopInt8() (int8, error)
	PopInt16() (int16, error)
	PopInt32() (int32, error)
	PopInt64() (int64, error)
	PopRune() (rune, error)
	PopUint() (uint, error)
	PopUint8() (uint8, error)
	PopUint16() (uint16, error)
	PopUint32() (uint32, error)
	PopUint64() (uint64, error)
	PopUintptr() (uintptr, error)
	PopString() (string, error)
	// Read will read the last elem without popping
	ReadBool() (bool, error)
	ReadByte() (byte, error)
	ReadComplex64() (complex64, error)
	ReadComplex128() (complex128, error)
	ReadError() (error, error)
	// Floats
	ReadFloat32() (float32, error)
	ReadFloat64() (float64, error)
	// Ints
	ReadInt() (int, error)
	ReadInt8() (int8, error)
	ReadInt16() (int16, error)
	ReadInt32() (int32, error)
	ReadInt64() (int64, error)
	ReadRune() (rune, error)
	ReadUint() (uint, error)
	ReadUint8() (uint8, error)
	ReadUint16() (uint16, error)
	ReadUint32() (uint32, error)
	ReadUint64() (uint64, error)
	ReadUintptr() (uintptr, error)
	ReadString() (string, error)
}

func NewStack

func NewStack() (sInterface Interface)

Jump to

Keyboard shortcuts

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