package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: May 16, 2024
License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more
Opens a new window with license information.
Imports: 0
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 non-thread-safe stack.
type Stack[T any] struct {
}
Stack is a non-thread-safe stack.
Peek looks at the top element of the stack.
Pop pops an element from the stack.
func (st *Stack[T]) Push(value T)
Push pushes an element onto the stack.
func (st *Stack[T]) Reset()
Reset resets the stack.
Size returns the stack size.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.