utils

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsInt64

func AbsInt64(x int64) int64

AbsInt64 ...

func Contains

func Contains(s []string, e string) bool

Contains ...

func FromProtoTime

func FromProtoTime(t *tspb.Timestamp) (time.Time, error)

FromProtoTime ...

func GetUserToken

func GetUserToken(ctx context.Context) string

GetUserToken ...

func InPlusMinusRange

func InPlusMinusRange(center int64, fluctuation int64, value int64) bool

InPlusMinusRange ...

func IsNilInterface

func IsNilInterface(v interface{}) bool

IsNilInterface ...

func IsValidEmail added in v0.3.2

func IsValidEmail(s string) bool

func MaxInt64

func MaxInt64(a int64, b int64) int64

MaxInt64 ...

func MergeWithOverride

func MergeWithOverride(dest, merge interface{}) error

MergeWithOverride ...

func ToProtoTime

func ToProtoTime(t time.Time) (*tspb.Timestamp, error)

ToProtoTime ...

func Unique

func Unique(slice []int) []int

Unique creates a copy from a slice with all duplicates removed

Types

This section is empty.

Jump to

Keyboard shortcuts

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