util

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OptionalBoolNone a "null" boolean value
	OptionalBoolNone = iota
	// OptionalBoolTrue a "true" boolean value
	OptionalBoolTrue
	// OptionalBoolFalse a "false" boolean value
	OptionalBoolFalse
)

Variables

This section is empty.

Functions

func EnsureAbsolutePath added in v1.3.0

func EnsureAbsolutePath(path string, absoluteBase string) string

EnsureAbsolutePath ensure that a path is absolute, making it relative to absoluteBase if necessary

func IsSliceInt64Eq added in v1.3.0

func IsSliceInt64Eq(a, b []int64) bool

IsSliceInt64Eq returns if the two slice has the same elements but different sequences.

func Max added in v1.3.0

func Max(a, b int) int

Max max of two ints

func Min added in v1.3.0

func Min(a, b int) int

Min min of two ints

func RemoveAll added in v1.2.0

func RemoveAll(path string) error

RemoveAll files from Go version 1.7 onward

Types

type Int64Slice added in v1.3.0

type Int64Slice []int64

Int64Slice attaches the methods of Interface to []int64, sorting in increasing order.

func (Int64Slice) Len added in v1.3.0

func (p Int64Slice) Len() int

func (Int64Slice) Less added in v1.3.0

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Swap added in v1.3.0

func (p Int64Slice) Swap(i, j int)

type OptionalBool

type OptionalBool byte

OptionalBool a boolean that can be "null"

func OptionalBoolOf

func OptionalBoolOf(b bool) OptionalBool

OptionalBoolOf get the corresponding OptionalBool of a bool

func (OptionalBool) IsFalse added in v1.3.0

func (o OptionalBool) IsFalse() bool

IsFalse return true if equal to OptionalBoolFalse

func (OptionalBool) IsNone added in v1.3.0

func (o OptionalBool) IsNone() bool

IsNone return true if equal to OptionalBoolNone

func (OptionalBool) IsTrue added in v1.3.0

func (o OptionalBool) IsTrue() bool

IsTrue return true if equal to OptionalBoolTrue

Jump to

Keyboard shortcuts

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