utils

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes int64) string

func IsHiddenFile

func IsHiddenFile(p string) (bool, error)

func Owner

func Owner(fi fs.FileInfo) (string, string, string, error)

Types

type Queue

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

func NewQueue

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

func (*Queue[T]) Empty

func (q *Queue[T]) Empty() bool

func (*Queue[T]) Len

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

func (*Queue[T]) Peek

func (q *Queue[T]) Peek() *T

func (*Queue[T]) Pop

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

func (*Queue[T]) Push

func (q *Queue[T]) Push(data T)

type Stack

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

func NewStack

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

func (*Stack[T]) Empty

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

func (*Stack[T]) Len

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

func (*Stack[T]) Peek

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

func (*Stack[T]) Pop

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

func (*Stack[T]) Push

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

type Table

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

func NewTable

func NewTable(columnCount int) *Table

func (*Table) NewEntry

func (t *Table) NewEntry() *TableEntry

func (*Table) Print

func (t *Table) Print()

func (*Table) String

func (t *Table) String() string

String creates a formatted string representation of the table.

type TableEntry

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

func (*TableEntry) AddCell

func (te *TableEntry) AddCell(cell string) error

func (*TableEntry) SetStyle

func (te *TableEntry) SetStyle(style *color.Color)

func (*TableEntry) Style

func (te *TableEntry) Style() *color.Color

Jump to

Keyboard shortcuts

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