Discover Packages
github.com/rocketlaunchr/igo
stack
package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Apr 6, 2020
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Stack is used to stores closures in order.
NewStack creates a new Stack.
lifo will make the stack operate in "LIFO" mode.
Otherwise it will operate in "FIFO" mode.
For fordefer, LIFO is required.
func (s *Stack ) Add(goroutine bool , fn interface{})
Add inserts a closure to the stack.
Unwind executes all stored closures from the
beginning to the end.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.