util

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsDuplicates

func ContainsDuplicates(data *[]string) (string, bool)

func Difference

func Difference(a, b []string) []string

Set Difference: A - B

func DumpRequest

func DumpRequest(r *http.Request) string

func EmptyAppError

func EmptyAppError() *model.AppError

func GetCurrentDateString

func GetCurrentDateString(timezone string) string

func GetKeyHash

func GetKeyHash(key string) string

func HasHave

func HasHave(count int) string

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

Because math.Min is for floats and casting to and from floats is dangerous.

func ParseRRuleFromString

func ParseRRuleFromString(rruleString string, startDate time.Time) (*rrule.RRule, error)

func SendEphemeralText

func SendEphemeralText(msg string) (*model.CommandResponse, *model.AppError)

func SingularPlural

func SingularPlural(count int) string

func SplitArgs

func SplitArgs(s string) ([]string, error)

func UserIcon

func UserIcon(userId string) string

Types

type LogWriter

type LogWriter struct {
	http.ResponseWriter
}

func (LogWriter) Write

func (w LogWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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