utils

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(ok bool, args ...any)

func IsDigit added in v0.3.0

func IsDigit(c byte) bool

func IsInCharset added in v0.3.0

func IsInCharset(c byte, charset string) bool

func IsSpace added in v0.3.0

func IsSpace(c byte) bool

func UpdateHelpFlag added in v0.2.0

func UpdateHelpFlag(cmd *cobra.Command)

func WalkCmd added in v0.2.0

func WalkCmd(cmd *cobra.Command, f func(*cobra.Command))

func Wrap

func Wrap(text string, limit int) string

Types

type Stack

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

func NewStack added in v0.3.0

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

func (*Stack[T]) Empty

func (s *Stack[T]) Empty() bool

func (*Stack[T]) Pop

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

func (*Stack[T]) Push

func (s *Stack[T]) Push(a ...T)

func (*Stack[T]) Size

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

func (*Stack[T]) Slice added in v0.3.0

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

func (*Stack[T]) String

func (s *Stack[T]) String() string

func (*Stack[T]) Top

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

Jump to

Keyboard shortcuts

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