Skip to content

Commit

Permalink
docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
icrowley committed Dec 23, 2014
1 parent ecf2265 commit 84bff6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Fake

Fake is a fake data generator for Go (Golang), heavily inspired by the forgery and ffaker Ruby gems.

# About
## About

Most data and methods are ported from forgery/ffaker Ruby gems.
For the list of available methods please look at https://godoc.org/github.com/icrowley/fake.
Currently english and russian languages are available.
Feel free to add other languages, but don't forget to regenerate data.go file using `github.com/mjibson/esc` tool and `esc -o data.go -pkg fake data` command because Fake embeds files unless you call `UseExternalData(true)` in order to be able to work without external files dependencies when compiled.

Fake embeds samples data files unless you call `UseExternalData(true)` in order to be able to work without external files dependencies when compiled, so, if you add new data files or make changes to existing ones don't forget to regenerate data.go file using `github.com/mjibson/esc` tool and `esc -o data.go -pkg fake data` command (or you can just use `go generate` command if you are using Go 1.4 or later).

## Install

Expand Down Expand Up @@ -76,7 +77,7 @@ fake.UseExternalData(true)
password := fake.Paragraph()
```

## Author
### Author

Dmitry Afanasyev,
http://twitter.com/i_crowley
Expand Down
9 changes: 8 additions & 1 deletion fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
Package fake is the fake data generatror for go (Golang), heavily inspired by forgery and ffaker Ruby gems
Most data and methods are ported from forgery/ffaker Ruby gems.
Currently english and russian languages are available.
Feel free to add other languages, but don't forget to regenerate data.go file using `github.com/mjibson/esc` tool and `esc -o data.go -pkg fake data` command because Fake embeds files unless you call `UseExternalData(true)` in order to be able to work without external file dependencies when compiled.
For the list of available methods please look at https://godoc.org/github.com/icrowley/fake.
Fake embeds samples data files unless you call UseExternalData(true) in order to be able to work without external files dependencies when compiled, so, if you add new data files or make changes to existing ones don't forget to regenerate data.go file using github.com/mjibson/esc tool and esc -o data.go -pkg fake data command (or you can just use go generate command if you are using Go 1.4 or later).
Examples:
name := fake.FirstName()
Expand Down Expand Up @@ -40,6 +44,9 @@ import (
"time"
)

//go:generate go get github.com/mjibson/esc
//go:generate esc -o data.go -pkg fake data

// cat/subcat/lang/samples
type samplesTree map[string]map[string][]string

Expand Down

0 comments on commit 84bff6d

Please sign in to comment.