Skip to content

Commit

Permalink
Merge pull request #248 from canbaytok/bugfixing
Browse files Browse the repository at this point in the history
Bugfixing
  • Loading branch information
brianvoe authored Jul 5, 2023
2 parents fbfd9b1 + f87eee0 commit 7d85507
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
11 changes: 11 additions & 0 deletions internet.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,4 +427,15 @@ func addInternetLookup() {
return httpVersion(r), nil
},
})

AddFuncLookup("macaddress", Info{
Display: "MAC Address",
Category: "internet",
Description: "Random MAC address",
Example: "cb:ce:06:94:22:e9",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return macAddress(r), nil
},
})
}
14 changes: 7 additions & 7 deletions word_connective.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ func connectiveTime(r *rand.Rand) string {
return getRandValue(r, []string{"word", "connective_time"})
}

// ConnectiveComparitive will generate a random comparative connective
func ConnectiveComparitive() string { return connectiveComparitive(globalFaker.Rand) }
// ConnectiveComparative will generate a random comparative connective
func ConnectiveComparative() string { return connectiveComparative(globalFaker.Rand) }

// ConnectiveComparitive will generate a random comparative connective
func (f *Faker) ConnectiveComparitive() string { return connectiveComparitive(f.Rand) }
// ConnectiveComparative will generate a random comparative connective
func (f *Faker) ConnectiveComparative() string { return connectiveComparative(f.Rand) }

func connectiveComparitive(r *rand.Rand) string {
func connectiveComparative(r *rand.Rand) string {
return getRandValue(r, []string{"word", "connective_comparitive"})
}

Expand Down Expand Up @@ -104,14 +104,14 @@ func addWordConnectiveLookup() {
},
})

AddFuncLookup("connectivecomparitive", Info{
AddFuncLookup("connectivecomparative", Info{
Display: "Connective Comparitive",
Category: "word",
Description: "Random connective comparative word",
Example: "in addition",
Output: "string",
Generate: func(r *rand.Rand, m *MapParams, info *Info) (interface{}, error) {
return connectiveComparitive(r), nil
return connectiveComparative(r), nil
},
})

Expand Down
12 changes: 6 additions & 6 deletions word_connective_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ func BenchmarkConnectiveTime(b *testing.B) {
}
}

func ExampleConnectiveComparitive() {
func ExampleConnectiveComparative() {
Seed(11)
fmt.Println(ConnectiveComparitive())
fmt.Println(ConnectiveComparative())
// Output: in addition
}

func ExampleFaker_ConnectiveComparitive() {
func ExampleFaker_ConnectiveComparative() {
f := New(11)
fmt.Println(f.ConnectiveComparitive())
fmt.Println(f.ConnectiveComparative())
// Output: in addition
}

func BenchmarkConnectiveComparitive(b *testing.B) {
func BenchmarkConnectiveComparative(b *testing.B) {
for i := 0; i < b.N; i++ {
ConnectiveComparitive()
ConnectiveComparative()
}
}

Expand Down

0 comments on commit 7d85507

Please sign in to comment.