Documentation
¶
Index ¶
- Variables
- func ByteCountBinary(b int64) string
- func ChmodR(path string, filePerm, dirPerm os.FileMode) error
- func CopyFile(src string, dst string) error
- func DeflateBuf(data []byte) []byte
- func Keys[M ~map[K]V, K comparable, V any](m M) []K
- func ReadFileFromTarGz(tarGzFile string, tarPath string) ([]byte, error)
- func ResolvePath(in string) string
- type BOFArgsBuffer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Debug logs.Level = 10 Warn logs.Level = 20 Info logs.Level = 30 Error logs.Level = 40 Important logs.Level = 50 DefaultLogStyle = map[logs.Level]string{ Debug: termenv.String(tui.Rocket+"[+]").Bold().Background(tui.Blue).String() + " %s ", Warn: termenv.String(tui.Zap+"[warn]").Bold().Background(tui.Yellow).String() + " %s ", Important: termenv.String(tui.Fire+"[*]").Bold().Background(tui.Purple).String() + " %s ", Info: termenv.String(tui.HotSpring+"[i]").Bold().Background(tui.Green).String() + " %s ", Error: termenv.String(tui.Monster+"[-]").Bold().Background(tui.Red).String() + " %s ", } )
Functions ¶
func ByteCountBinary ¶
ByteCountBinary - Pretty print byte size
func DeflateBuf ¶
DeflateBuf - Deflate a buffer using BestCompression (9)
func Keys ¶
func Keys[M ~map[K]V, K comparable, V any](m M) []K
From the x/exp source code - gets a slice of keys for a map
func ReadFileFromTarGz ¶
ReadFileFromTarGz - Read a file from a tar.gz file in-memory
func ResolvePath ¶
ResolvePath - Resolve a path from an assumed root path
Types ¶
type BOFArgsBuffer ¶
func (*BOFArgsBuffer) AddData ¶
func (b *BOFArgsBuffer) AddData(d []byte) error
func (*BOFArgsBuffer) AddInt ¶
func (b *BOFArgsBuffer) AddInt(d uint32) error
func (*BOFArgsBuffer) AddShort ¶
func (b *BOFArgsBuffer) AddShort(d uint16) error
func (*BOFArgsBuffer) AddString ¶
func (b *BOFArgsBuffer) AddString(d string) error
func (*BOFArgsBuffer) AddWString ¶
func (b *BOFArgsBuffer) AddWString(d string) error
func (*BOFArgsBuffer) GetBuffer ¶
func (b *BOFArgsBuffer) GetBuffer() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.