Documentation ¶
Index ¶
- func Atoi(s string) int
- func GetExportedName(field string) string
- func GetRegex(rx string) *regexp.Regexp
- func GroupsFromRegex(rx, line string) map[string]string
- func InStrings(item string, items []string) bool
- func PanicIfNil(check interface{}, message string)
- func PanicOnError(err error, message string)
- func ShowDiff(a, b string) string
- func Ucfirst(word string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Atoi ¶
Atoi converts a string to an integer in cases where we are sure that s will be a valid integer, otherwise it will panic.
func GetExportedName ¶
GetExportedName returns a deterministic and Go safe name for a C type. For example, "*__foo[]" will return "FooSlice".
func GroupsFromRegex ¶
GroupsFromRegex gets RegExp groups after matching it on a line
func PanicIfNil ¶
func PanicIfNil(check interface{}, message string)
PanicIfNil will panic with the message provided if the check is nil. This is a convieniance method to avoid many similar if statements.
func PanicOnError ¶
PanicOnError will panic with the message and error if the error is not nil. If the error is nil (no error) then nothing happens.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.