lib

package
v0.0.0-...-3b1dc3b Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CacheLineSize = int(unsafe.Sizeof(cpu.CacheLinePad{}))

Variables

This section is empty.

Functions

func JsonToYaml

func JsonToYaml(jsonData []byte) ([]byte, error)

JsonToYaml converts JSON data to YAML data

func ReadProtoFromFile

func ReadProtoFromFile(filename string, protomsg proto.Message) error

func YamlToJson

func YamlToJson(yamlData []byte) ([]byte, error)

YamlToJson converts YAML data to JSON data

Types

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue[T any]() *Queue[T]

func (*Queue[T]) Count

func (q *Queue[T]) Count() int

func (*Queue[T]) Dequeue

func (q *Queue[T]) Dequeue() (T, bool)

func (*Queue[T]) Enqueue

func (q *Queue[T]) Enqueue(v T) *Queue[T]

func (*Queue[T]) Pop

func (q *Queue[T]) Pop() (bool, T)

Pop Don't usePreviously used a different package https://github.com/zeroflucs-given/generics/tree/main/collections So temporarily keeping the old method names for backward compatibility Deprecated: Use Dequeue instead

func (*Queue[T]) Push

func (q *Queue[T]) Push(v T) error

Push Don't usePreviously used a different package https://github.com/zeroflucs-given/generics/tree/main/collections So temporarily keeping the old method names for backward compatibility Deprecated: Use Enqueue instead

type Stack

type Stack[T any] struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack[T any]() *Stack[T]

func (*Stack[T]) Clone

func (s *Stack[T]) Clone() *Stack[T]

func (*Stack[T]) Head

func (s *Stack[T]) Head() (T, bool)

func (*Stack[T]) Len

func (s *Stack[T]) Len() int

func (*Stack[T]) MarshalJSON

func (s *Stack[T]) MarshalJSON() ([]byte, error)

func (*Stack[T]) Peek

func (s *Stack[T]) Peek() (T, bool)

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() (T, bool)

func (*Stack[T]) Push

func (s *Stack[T]) Push(v T) *Stack[T]

func (*Stack[T]) RawArrayCopy

func (s *Stack[T]) RawArrayCopy() []T

type TriState

type TriState struct {
	// contains filtered or unexported fields
}

func (TriState) IsSet

func (t TriState) IsSet() bool

func (TriState) IsSetToFalse

func (t TriState) IsSetToFalse() bool

func (TriState) IsSetToTrue

func (t TriState) IsSetToTrue() bool

func (TriState) Set

func (t TriState) Set(value bool)

func (TriState) Unset

func (t TriState) Unset()

func (TriState) Value

func (t TriState) Value(defaultIfNotSet bool) bool

Jump to

Keyboard shortcuts

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