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

add userdefined data #5

Merged
merged 2 commits into from
Jul 10, 2017
Merged

add userdefined data #5

merged 2 commits into from
Jul 10, 2017

Conversation

bxcodec
Copy link
Owner

@bxcodec bxcodec commented Jul 10, 2017

Based on #1

About This !!!

  • added email generator. Still using random text and random domain
  • added Credit Card Generator . Just a Random Number, with predefined CC (VISA,MASTERCARD, AMEX, DISCOVER)
  • added IP Addres Generator (IPV4 & IPV6)
  • added LATITUDE and LONGITUDE generator (float32 & float64)

Example of use :

type SomeStruct struct {
	Latitude         float32 `faker:"lat"`
	Longitude        float32 `faker:"long"`
	String           string
	CreditCardType   string `faker:"cc_type"`
	CreditCardNumber string `faker:"cc_number"`
	Email            string `faker:"email"`
	IPV4             string `faker:"ipv4"`
	IPV6             string `faker:"ipv6"`
}
func SampleFunc(){
  var a SomeStruct
  err := FakeData(&a)
  if err == nil {
          fmt.Printf("%+v", a)
   }
}

@codecov
Copy link

codecov bot commented Jul 10, 2017

Codecov Report

Merging #5 into master will increase coverage by 4.71%.
The diff coverage is 89.62%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
+ Coverage    83.9%   88.62%   +4.71%     
==========================================
  Files           1        2       +1     
  Lines          87      211     +124     
==========================================
+ Hits           73      187     +114     
- Misses         12       17       +5     
- Partials        2        7       +5
Impacted Files Coverage Δ
credit_card.go 77.77% <77.77%> (ø)
faker.go 90.85% <93.93%> (+6.94%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43c5f0b...afaf61a. Read the comment docs.

@bxcodec bxcodec merged commit 72b9228 into master Jul 10, 2017
@bxcodec bxcodec deleted the userDefinedData branch July 10, 2017 17:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant