Update go dependencies
This commit is contained in:
parent
e0561ddeb9
commit
88a2751234
1970 changed files with 413928 additions and 222867 deletions
8
vendor/github.com/google/gofuzz/README.md
generated
vendored
8
vendor/github.com/google/gofuzz/README.md
generated
vendored
|
|
@ -14,21 +14,21 @@ This is useful for testing:
|
|||
Import with ```import "github.com/google/gofuzz"```
|
||||
|
||||
You can use it on single variables:
|
||||
```
|
||||
```go
|
||||
f := fuzz.New()
|
||||
var myInt int
|
||||
f.Fuzz(&myInt) // myInt gets a random value.
|
||||
```
|
||||
|
||||
You can use it on maps:
|
||||
```
|
||||
```go
|
||||
f := fuzz.New().NilChance(0).NumElements(1, 1)
|
||||
var myMap map[ComplexKeyType]string
|
||||
f.Fuzz(&myMap) // myMap will have exactly one element.
|
||||
```
|
||||
|
||||
Customize the chance of getting a nil pointer:
|
||||
```
|
||||
```go
|
||||
f := fuzz.New().NilChance(.5)
|
||||
var fancyStruct struct {
|
||||
A, B, C, D *string
|
||||
|
|
@ -37,7 +37,7 @@ f.Fuzz(&fancyStruct) // About half the pointers should be set.
|
|||
```
|
||||
|
||||
You can even customize the randomization completely if needed:
|
||||
```
|
||||
```go
|
||||
type MyEnum string
|
||||
const (
|
||||
A MyEnum = "A"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue