util

package
v0.0.0-...-08a0481 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BreakPathRelative

func BreakPathRelative(path string) (parts []string, links []string)

BreakPathRelative splits up the given path and calculates a relative link for each part.

func SignedByteCount

func SignedByteCount(b int64) string

func Unique

func Unique(s []string) []string

Unique sorts and de-duplicates the input slice.

Types

type SemverSort

type SemverSort []string

SemverSort is a helper type to order semver version slices in decreasing order. All elements of the slice are assumed to be valid semver versions.

func (SemverSort) Len

func (s SemverSort) Len() int

func (SemverSort) Less

func (s SemverSort) Less(i, j int) bool

func (SemverSort) Swap

func (s SemverSort) Swap(i, j int)

Jump to

Keyboard shortcuts

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