util

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExecutable added in v0.8.1

func IsExecutable(file os.FileInfo) bool

func IsExecutableMode added in v0.8.1

func IsExecutableMode(mode os.FileMode) bool
func IsSymLink(file os.FileInfo) bool

func Max added in v0.9.0

func Max[T cmp.Ordered](a, b T) T

func Min added in v0.9.0

func Min[T cmp.Ordered](a, b T) T

func RecursivelySizeOf added in v0.8.5

func RecursivelySizeOf(info os.FileInfo, depth int) int64

RecursivelySizeOf returns the size of the file or directory depth < 0 means no limit

Types

type Once

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

func (*Once) Do

func (o *Once) Do(fn func() error) error

type Slice added in v0.8.0

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

func NewSlice added in v0.8.0

func NewSlice[T any](size int) *Slice[T]

func (*Slice[T]) AppendTo added in v0.8.0

func (s *Slice[T]) AppendTo(d T)

func (*Slice[T]) At added in v0.8.0

func (s *Slice[T]) At(pos int) T

func (*Slice[T]) Clear added in v0.8.0

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

func (*Slice[T]) GetCopy added in v0.8.0

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

func (*Slice[T]) GetRaw added in v0.8.0

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

func (*Slice[T]) Len added in v0.8.0

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

func (*Slice[T]) Set added in v0.8.0

func (s *Slice[T]) Set(pos int, d T)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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