// looksLikeHeaderElement returns true iff element looks like it's a header,
// not a test. Some ACVP files contain a header as the first element that
// should be duplicated into the response, and some don't. If the element
// contains a "url" field then we guess that it's a header.

looksLikeHeaderElement returns true iff element looks like it's a header,
not a test. Some ACVP files contain a header as the first element that
should be duplicated into the response, and some don't. If the element
contains a "url" field then we guess that it's a header.
// looksLikeHeaderElement returns true iff element looks like it ' s a header // not a test . Some ACVP files contain a header as the first element that // should be duplicated into the response and some don ' t . If the element // contains a " url " field then we guess that it ' s a header .
func looksLikeHeaderElement(element json.RawMessage) bool {
	var headerFields struct {
		URL string `json:"url"`
	}
	if err := json.Unmarshal(element, &headerFields); err != nil {
		return false
	}
	return len(headerFields.URL) > 0
}
func looksLikeHeaderElement ( element json . RawMessage ) bool { var headerFields struct { URL string `json:"url"` } if err := json . Unmarshal ( element , & headerFields ) ; err != nil { return false } return len ( headerFields . URL ) > 0 }
looksLikeHeaderElement returns true iff element looks like it's a header,
not a test.
looksLikeHeaderElement returns true iff element looks like it ' s a header not a test .