util

package
v2.4.10 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InSlice

func InSlice(str string, values []string) bool

func InitSlack

func InitSlack(token string, channel string, username string)

InitSlack Initializes a slack client with the given token and sets the default channel.

func NullStringFrom

func NullStringFrom(s string) null.String

func PtrToBool

func PtrToBool(b bool) *bool

func PtrToByte

func PtrToByte(b byte) *byte

func PtrToComplex128

func PtrToComplex128(c complex128) *complex128

func PtrToComplex64

func PtrToComplex64(c complex64) *complex64

func PtrToError

func PtrToError(e error) *error

func PtrToFloat32

func PtrToFloat32(f float32) *float32

func PtrToFloat64

func PtrToFloat64(f float64) *float64

func PtrToInt

func PtrToInt(i int) *int

func PtrToInt16

func PtrToInt16(i int16) *int16

func PtrToInt32

func PtrToInt32(i int32) *int32

func PtrToInt64

func PtrToInt64(i int64) *int64

func PtrToInt8

func PtrToInt8(i int8) *int8

func PtrToNullFloat32

func PtrToNullFloat32(f float32) *null.Float32

func PtrToNullFloat64

func PtrToNullFloat64(f float64) *null.Float64

func PtrToNullString

func PtrToNullString(s string) *null.String

func PtrToNullTime

func PtrToNullTime(t time.Time) *null.Time

func PtrToNullUint64

func PtrToNullUint64(u uint64) *null.Uint64

func PtrToRune

func PtrToRune(r rune) *rune

func PtrToString

func PtrToString(s string) *string

func PtrToTime

func PtrToTime(t time.Time) *time.Time

func PtrToUint

func PtrToUint(u uint) *uint

func PtrToUint16

func PtrToUint16(u uint16) *uint16

func PtrToUint32

func PtrToUint32(u uint32) *uint32

func PtrToUint64

func PtrToUint64(u uint64) *uint64

func PtrToUint8

func PtrToUint8(u uint8) *uint8

func PtrToUintptr

func PtrToUintptr(u uintptr) *uintptr

func SendToSlack

func SendToSlack(format string, a ...interface{}) error

SendToSlack Sends message to the default channel.

func SendToSlackChannel

func SendToSlackChannel(channel, username, format string, a ...interface{}) error

SendToSlackChannel Sends message to a specific channel.

func SendToSlackUser

func SendToSlackUser(user, username, format string, a ...interface{}) error

SendToSlackUser Sends message to a specific user.

func StrFromNull

func StrFromNull(str null.String) string

func StrFromPtr

func StrFromPtr(ptr *string) string

func SubstringInSlice

func SubstringInSlice(str string, values []string) bool

SubstringInSlice returns true if str is contained within any element of the values slice. False otherwise

func Underscore

func Underscore(s string) string

Underscore converts "CamelCasedString" to "camel_cased_string".

Types

This section is empty.

Jump to

Keyboard shortcuts

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