package
module
Version:
v0.0.0-...-0f9faeb
Opens a new window with list of versions in this module.
Published: Feb 2, 2018
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.
README
¶
Documentation
¶
type Stack struct {
Stack []interface{}
sync.Mutex
}
Stack is the struct which implments the methods Push, Pop, Top, IsEmpty
NewStack returns a new Stack struct
IsEmpty returns true if the stack is empty or nil
func (s *Stack) Pop() interface{}
Pop returns and removes the last element of the Stack
func (s *Stack) Push(item interface{})
Push is adding the given element onto the stack
func (s *Stack) Top() interface{}
Top returns the last element of the Stack
Source Files
¶
Click to show internal directories.
Click to hide internal directories.