util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2019 License: MIT Imports: 5 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 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 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