Documentation
¶
Index ¶
- func Email() string
- func Fill(spec interface{}) error
- func HerokuDBName(src rand.Source) string
- func Host() string
- func IntRange(min, max int) int
- func Paragraph(min, max int) string
- func ReadablePath(sentence string) string
- func Sentence(min, max int) string
- func URL() string
- func Word(min, max int) string
- type Decoder
- type ParseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
func Fill(spec interface{}) error
Fill will fill in the structure with random stuff using lorme ipsum for strings
func HerokuDBName ¶
HerokuDBName generates a random string of lower case letters and numbers
func ReadablePath ¶
ReadablePath converts all spaces to -, and removes . and , TODO: we should probably encode the rest?
Types ¶
type Decoder ¶
type Decoder interface {
// LoremDecode will give you an example string
// if appropriate given the tag on that field
LoremDecode(tag, example string) error
}
Decoder is for types wanting to do their own loremizing we assume clients can do their own random numbers
type ParseError ¶
A ParseError occurs when an environment variable cannot be converted to the type required by a struct field during assignment.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Click to show internal directories.
Click to hide internal directories.