Documentation
¶
Overview ¶
Package hstack provides a simple and lean last-in/first-out stack.
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
}
Stack is the main type for this package. It holds the internal information about the stack.
func (*Stack) Add ¶
Add adds one or more new items to the top of the stack. Items are pushed in order, so the first argument is pushed first, and the second, second, and so on. This means that the last argument to Add will be the first item returned with Pop.
func (*Stack) Merge ¶
Merge adds a stack on top of the current stack. This will take ownership of and clear the provided stack.
func (*Stack) Pop ¶
func (s *Stack) Pop() interface{}
Pop removes the top item from the stack and returns its value.
Click to show internal directories.
Click to hide internal directories.