stackKit

package
v3.0.906 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stack

type Stack[V any] interface {
	// Push 放在最后面
	Push(ele V)

	// Pop 移除并返回最后面的元素
	Pop() (V, bool)

	Size() int
}

Stack 堆栈(后进先出)

func NewStack

func NewStack[V any](safe ...bool) Stack[V]

func NewStackFrom deprecated

func NewStackFrom[V any](s []V, safe ...bool) Stack[V]

NewStackFrom

Deprecated: 有点耗性能,看 GoFrame 后续会不会支持泛型.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL