utils

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BYTE = 1 << (10 * iota)
	KILOBYTE
	MEGABYTE
	GIGABYTE
)

define byte units

Variables

This section is empty.

Functions

func ByteSize

func ByteSize(bytes int) string

ByteSize returns string format with unit.

func FetchLatestVersion

func FetchLatestVersion(ctx context.Context) (version string, err error)

func MatchConditionTags

func MatchConditionTags(opt *types.FilterOption, tagNames []string) (contained bool)

MatchConditionTags retunrn matched option

Types

type StrByLen added in v0.1.0

type StrByLen []string

StrByLen is alias string slice

func (StrByLen) Len added in v0.1.0

func (a StrByLen) Len() int

Len is

func (StrByLen) Less added in v0.1.0

func (a StrByLen) Less(i, j int) bool

Less is

func (StrByLen) Swap added in v0.1.0

func (a StrByLen) Swap(i, j int)

Swap is

Jump to

Keyboard shortcuts

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