util

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: MIT Imports: 7 Imported by: 3

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 added in v0.1.0

func NullStringFrom(s string) null.String

func PtrToBool added in v0.1.0

func PtrToBool(b bool) *bool

func PtrToByte added in v0.1.0

func PtrToByte(b byte) *byte

func PtrToComplex128 added in v0.1.0

func PtrToComplex128(c complex128) *complex128

func PtrToComplex64 added in v0.1.0

func PtrToComplex64(c complex64) *complex64

func PtrToError added in v0.1.0

func PtrToError(e error) *error

func PtrToFloat32 added in v0.1.0

func PtrToFloat32(f float32) *float32

func PtrToFloat64 added in v0.1.0

func PtrToFloat64(f float64) *float64

func PtrToInt added in v0.1.0

func PtrToInt(i int) *int

func PtrToInt16 added in v0.1.0

func PtrToInt16(i int16) *int16

func PtrToInt32 added in v0.1.0

func PtrToInt32(i int32) *int32

func PtrToInt64 added in v0.1.0

func PtrToInt64(i int64) *int64

func PtrToInt8 added in v0.1.0

func PtrToInt8(i int8) *int8

func PtrToNullString added in v0.1.0

func PtrToNullString(s string) *null.String

func PtrToNullUint64 added in v0.1.0

func PtrToNullUint64(u uint64) *null.Uint64

func PtrToRune added in v0.1.0

func PtrToRune(r rune) *rune

func PtrToString added in v0.1.0

func PtrToString(s string) *string

func PtrToTime added in v0.1.0

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

func PtrToUint added in v0.1.0

func PtrToUint(u uint) *uint

func PtrToUint16 added in v0.1.0

func PtrToUint16(u uint16) *uint16

func PtrToUint32 added in v0.1.0

func PtrToUint32(u uint32) *uint32

func PtrToUint64 added in v0.1.0

func PtrToUint64(u uint64) *uint64

func PtrToUint8 added in v0.1.0

func PtrToUint8(u uint8) *uint8

func PtrToUintptr added in v0.1.0

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 added in v0.1.0

func StrFromNull(str null.String) string

func StrFromPtr added in v0.1.0

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