package
Version:
v0.0.0-...-4b9bf86
Opens a new window with list of versions in this module.
Published: Mar 22, 2020
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package stack provides a concurrency-safe stack for interface{}
guarded by a sync.Mutex
Stack implements a concurrency-safe stack for anything (interface{})
guarded by a sync.Mutex
New returns a new empty stack with given initial capacity
Drop pops sth silently off the current stack
func (s *Stack) Get() []interface{}
Get returns a copy of the current stack
Init returns an empty stack with given initial capacity
Len returns the length of the current stack
func (s *Stack) Pop() interface{}
Pop sth off the current stack
func (s *Stack) Push(l interface{})
Push sth onto the current stack
func (s *Stack) Top() interface{}
Top returns the top of the current stack
Source Files
¶
Click to show internal directories.
Click to hide internal directories.