idfm-api/types/container_fuzz.go

22 lines
286 B
Go
Raw Normal View History

2023-07-14 10:23:33 +00:00
// +build gofuzz
package types
func FuzzContainer(data []byte) int {
c := &Container{}
// Let's unmarshal, this is not our job so "bleh"
err := c.UnmarshalJSON(data)
if err != nil {
return 0
}
// Let's check it !
err = c.Check()
if err != nil {
return 0
}
return 1
}