Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConjunctionDefault = "and" SeparatorDefault = "," WrappersDefault = Empty EmptyListMessageDefault = "" )
Variables ¶
This section is empty.
Functions ¶
func OxfordizeList ¶
func OxfordizeList(elements []string, options ...OxfordOptions) string
func ParseFlags ¶
ParseFlags - convert command line flags to a map of keys to strings.
func TrimQuotes ¶
TrimQuotes - given an input string, remove one layer of surrounding quotes if they exist.
func WrapString ¶
func WrapString(input string, wrappers WrapOption) string
Types ¶
type OxfordConfigs ¶
type OxfordConfigs struct {
// contains filtered or unexported fields
}
type OxfordOptions ¶
type OxfordOptions func(config *OxfordConfigs)
func WithConjunction ¶
func WithConjunction(conjunction string) OxfordOptions
func WithEmptyListMessage ¶
func WithEmptyListMessage(message string) OxfordOptions
func WithInnerWrappers ¶
func WithInnerWrappers(wrappers WrapOption) OxfordOptions
func WithOuterWrappers ¶
func WithOuterWrappers(wrappers WrapOption) OxfordOptions
func WithSeparator ¶
func WithSeparator(separator string) OxfordOptions
type WrapOption ¶
type WrapOption int
const ( Empty WrapOption = iota SingleQuotes DoubleQuotes TackQuotes Parentheses SquareBrackets AngleBrackets )
Click to show internal directories.
Click to hide internal directories.