utils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpJSON

func DumpJSON(r interface{}) string

DumpJSON dumps a json-compatible struct in human-readable form

func IsListeningSocket

func IsListeningSocket(socket string) (bool, error)

IsListeningSocket returns true if connections are accepted on the socket.

func ParseEnabled

func ParseEnabled(value string) (bool, error)

ParseEnabled returns whether the given string represents an 'enabled' state.

func SortUint64s

func SortUint64s(a []uint64)

SortUint64s sorts a slice of uint64 in increasing order.

func UncompressTbz2

func UncompressTbz2(archive string, dir string) error

Types

type Uint64Slice

type Uint64Slice []uint64

Uint64Slice implmenents sort.Interface for a slice of uint64.

func (Uint64Slice) Len

func (s Uint64Slice) Len() int

Len returns the length of an UintSlice

func (Uint64Slice) Less

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

Less returns true if element at 'i' is less than the element at 'j'

func (Uint64Slice) Swap

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

Swap swaps the values of two elements

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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