utils

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 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 added in v1.0.1

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 added in v1.0.2

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

func NewTable added in v1.0.2

func NewTable(columnCount int) *Table

func (*Table) NewEntry added in v1.0.2

func (t *Table) NewEntry() *TableEntry

func (*Table) Print added in v1.0.2

func (t *Table) Print()

func (*Table) String added in v1.0.2

func (t *Table) String() string

String creates a formatted string representation of the table.

type TableEntry added in v1.0.2

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

func (*TableEntry) AddCell added in v1.0.2

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

func (*TableEntry) SetStyle added in v1.0.2

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

func (*TableEntry) Style added in v1.0.2

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

Jump to

Keyboard shortcuts

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