modulepackage
0.0.0-20150622234138-8080b1735a88
Repository: https://github.com/go-goodies/go_utils.git
Documentation: pkg.go.dev
# README
Summary

This utility software package contains functions and objects to help you write better Golang code faster.
Installation
go get github.com/go-goodies/go_utils
License
This project is licensed under a Simplified BSD license. Please read the LICENSE file.
# Functions
Check whether the expected (e) widget is in the slice (s) of widgets.
No description provided by the author
No description provided by the author
No description provided by the author
Prevent special CSV characters ("," and ";") from splitting a column.
Repeat a character (typically used for simple formatting of output).
Copy makes a recursive deep copy of obj and returns the result.
FileExists returns true if the file exists.
Check whether the expected (e) string is in the slice (s) of stings.
Iif_string is and immediate if helper that takes a boolean expression and returns a string, true_val if the expression is true else false_val.
Find index of search string in target string, starting at startPos Ex: domain := email[IndexOf("@", email, 0)+1:].
IndexOfGeneric returns the index of an element in any type of slice ints := []int{1, 2, 3} strings := []string{"A", "B", "C"} IndexOfGeneric(len(ints), func(i int) bool { return ints[i] == 2 }) IndexOfGeneric(len(strings), func(i int) bool { return strings[i] == "B" }).
Check whether the expected (e) int is in the slice (s) of ints.
No description provided by the author
No description provided by the author
No description provided by the author
reflect doesn't consider 0 or "" to be zero, so we double check those here Can handle a struct field (only one level).
Assumes the argument is not a struct.
Assumes the argument is a struct.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Printf("isLower(\"a\"): %v\n", isLower("a")) // isLower("a"): true Printf("isLower(\"A\"): %v\n", isLower("A")) // isLower("A"): false.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Concat joins the strings in a slice, delimiting them with a comma, but it allows you to pass the delimiter string to create a single string Ex: data: []string{"A", "B", "C"}; Join(data) ==> "A,B,C" ; Join(data, "|") ==> "A|B|C".
LengthOf returns the number if items in argument.
NewSingleton is a singleton object which restricts object creation to only one instance.
No description provided by the author
PadLeft pads a string (s) with with a specified string (optional parameter) for padLen characters If no string argument is passed, then s will be padded, to the left, with a single space character.
PadRight pads a string (s) with with a specified string (optional parameter) for padLen characters If no string argument is passed, then s will be padded, to the right, with a single space character.
A: 65 B: 66 .
QueryString takes an http request object and returns its query string.
No description provided by the author
Check whether the expected (e) string is in the slice (s) of stings.
Substr returns a portion (length characters) of string (s), beginning at a specified position (pos).
ToCurrency converts the value to a dollar and cents string.
ToFloat converts the argument to a float64 throws panic if argument is non-numeric parameter.
ToInt64 converts the argument to a int64 throws panic if argument is non-numeric parameter.
ToString converts the value to a string.
ToTS converts the value to a timestamp string (accepts both time.Time and *time.Time as argument).
ToUnsignedInteger converts the argument to a uint64 throws panic if argument is non-numeric parameter.
TypeOf returns the reflection Type of the value in the interface{}.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author