Documentation ¶ Index ¶ func GetURLSuffix(r *http.Request) string func Round(val float64) int func StringInSlice(str string, arr []string) bool func TimeDiff(t time.Time) string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetURLSuffix ¶ func GetURLSuffix(r *http.Request) string GetURLSuffix returns last part of the url url: poll/10/edit => returned: edit func Round ¶ func Round(val float64) int Round is utility function for rounding floats to nearest integer func StringInSlice ¶ func StringInSlice(str string, arr []string) bool StringInSlice returns true if string exists in array and false if it does not func TimeDiff ¶ func TimeDiff(t time.Time) string TimeDiff returns time difference between inserted time and time now in suitable format according to number of: seconds if time < 1min minutes if time < 1hour hours if time < 1 day days if time < 1 month months if time < 1 year years if time > 1 year Types ¶ This section is empty. Source Files ¶ View all Source files arrayUtils.go timeDiff.go urlUtils.go Click to show internal directories. Click to hide internal directories.