mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Add LoadAdvisory tests
This commit is contained in:
parent
e7c08d05cd
commit
c81f55a752
5 changed files with 563 additions and 1 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
|
||||
// StrictJSONParse creates a JSON decoder that decodes an interface
|
||||
// while not allowing unknown fields nor trailing data
|
||||
func StrictJSONParse(jsonData io.Reader, target interface{}) error {
|
||||
func StrictJSONParse(jsonData io.Reader, target any) error {
|
||||
decoder := json.NewDecoder(jsonData)
|
||||
// Don't allow unknown fields
|
||||
decoder.DisallowUnknownFields()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue