Documentation
¶
Index ¶
- func AppendStrings(out []string, in []string, prefix string) []string
- func BlockIndent(txt string, prefixes []string, indents []string) string
- func Capitalize(s string) string
- func CompareStrings(t *testing.T, testName string, gotStrings, wantStrings []string) bool
- func ValueIfTrue(boolTest bool, trueValue, falseValue string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendStrings ¶ added in v0.0.6
AppendStrings adds non-empty strings from in to out and returns a new slice.
func BlockIndent ¶
BlockIndent indents each line in a block of text.
Line format is: <prefix><indent><text>
Args: - txt -- the block of text to indent - prefixes -- strings that appears before the indent on each line.
- if length=0, prefix is empty
- if length=1, same prefix is used on every line
- if length=2, 1st line prefix and all other line prefix
- any other length is invalid
- indents -- indent strings after prefix but before text.
- if length=0, indent is empty
- if length=1, same indent is used on every line
- if length=2, 1st line indent and all other line indent
- any other length is invalid
Returns: - if error, string with format: ERROR: <error message> - indented string if no errors
func Capitalize ¶
Capitalize returns string with its first letter in uppercase.
func CompareStrings ¶ added in v0.0.6
func ValueIfTrue ¶
ValueIfTrue converts a boolean into strings for true and false. - if boolTest is true, return trueValue else return falseValue
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.