Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
chores(docs): Move example from markdown to tests (#89)
Browse files Browse the repository at this point in the history
It's required because:
- package users can use godoc.org, pkg.go.dev for exploring
the package documentation
- testable examples can be more in sync with actual code

This commit moves examples from the plain markdown to testable
examples. It allows to test examples during test phase and have
them more in sync with actual code. Also the examples can be
shown by documentation servers and in IDEs and make work with
package much more user-friendly as not everyone looks into
README.md at repo's root.

Related to #68
  • Loading branch information
mrVanboy authored Feb 25, 2020
1 parent 2ed7817 commit 7198e34
Show file tree
Hide file tree
Showing 9 changed files with 314 additions and 457 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ go get -u github.com/bxcodec/faker/v3

---

- Using Struct's tag: [WithStructTag.md](/WithStructTag.md)
- Custom Struct's tag (define your own faker data): [CustomFaker.md](/CustomFaker.md)
- Without struct's tag: [WithoutTag.md](/WithoutTag.md)
- Single Fake Data Function: [SingleFakeData.md](/SingleFakeData.md)
- Using Struct's tag:
- [basic tags: example_with_tags_test.go](/example_with_tags_test.go)
- [length and bounds: example_with_tags_lenbounds_test.go](/example_with_tags_lenbounds_test.go)
- [unique: example_with_tags_unique_test.go](example_with_tags_unique_test.go)
- Custom Struct's tag (define your own faker data): [example_custom_faker_test.go](/example_custom_faker_test.go)
- Without struct's tag: [example_without_tag_test.go](/example_without_tag_test.go)
- Single Fake Data Function: [example_single_fake_data_test.go](/example_single_fake_data_test.go)

## DEMO

Expand Down
111 changes: 0 additions & 111 deletions SingleFakeData.md

This file was deleted.

Loading

0 comments on commit 7198e34

Please sign in to comment.