collection

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: AGPL-3.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToStruct

func MapToStruct(m map[string]interface{}, obj interface{}) error

func StructToMap

func StructToMap(obj interface{}, options *MapOptions) map[string]interface{}

Types

type MapOptions

type MapOptions struct {
	OmitEmpty  bool
	OmitBool   bool
	OmitNumber bool
}

type Queue

type Queue struct {
	First  *QueueNode //最老的
	Last   *QueueNode //最新的
	Length int
	// contains filtered or unexported fields
}

func (*Queue) Create

func (queue *Queue) Create(Data ...interface{})

创建链列(数据)

func (*Queue) Pop

func (queue *Queue) Pop() interface{}

出队(delete)

func (*Queue) Push

func (queue *Queue) Push(Data interface{})

入列(insert)

type QueueNode

type QueueNode struct {
	Data interface{}
	Next *QueueNode // 比自己老的
}

Jump to

Keyboard shortcuts

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