vmstack

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

func New

func New() *Stack

Create a new stack

func (*Stack) CreateShadowStack

func (this *Stack) CreateShadowStack() func()

CreateShadowStack creates a shadow stack, which can be used to restore the stack to its current state. dont pop the top item of the stack.

func (*Stack) GetAll added in v1.2.6

func (this *Stack) GetAll(callback func(any))

break: get all stack value and callback

func (*Stack) Len

func (this *Stack) Len() int

Return the number of items in the stack

func (*Stack) Peek

func (this *Stack) Peek() interface{}

View the top item on the stack

func (*Stack) PeekN

func (this *Stack) PeekN(n int) interface{}

View the top n item on the stack

func (*Stack) Pop

func (this *Stack) Pop() interface{}

Pop the top item of the stack and return it

func (*Stack) Push

func (this *Stack) Push(value interface{})

Push a value onto the top of the stack

Jump to

Keyboard shortcuts

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