1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Used keyed initializers to make govet happy.

This commit is contained in:
Sascha L. Teichmann 2021-12-09 12:03:03 +01:00
parent 2fb2dfda78
commit 907894416f
2 changed files with 2 additions and 2 deletions

View file

@ -451,7 +451,7 @@ func NewProviderMetadataDomain(domain string, tlps []TLPLabel) *ProviderMetadata
// WriteTo saves a metadata provider to a writer. // WriteTo saves a metadata provider to a writer.
func (pmd *ProviderMetadata) WriteTo(w io.Writer) (int64, error) { func (pmd *ProviderMetadata) WriteTo(w io.Writer) (int64, error) {
nw := util.NWriter{w, 0} nw := util.NWriter{Writer: w, N: 0}
enc := json.NewEncoder(&nw) enc := json.NewEncoder(&nw)
enc.SetIndent("", " ") enc.SetIndent("", " ")
err := enc.Encode(pmd) err := enc.Encode(pmd)

View file

@ -72,7 +72,7 @@ func LoadROLIEFeed(r io.Reader) (*ROLIEFeed, error) {
// WriteTo saves a ROLIE feed to a writer. // WriteTo saves a ROLIE feed to a writer.
func (rf *ROLIEFeed) WriteTo(w io.Writer) (int64, error) { func (rf *ROLIEFeed) WriteTo(w io.Writer) (int64, error) {
nw := util.NWriter{w, 0} nw := util.NWriter{Writer: w, N: 0}
enc := json.NewEncoder(&nw) enc := json.NewEncoder(&nw)
enc.SetIndent("", " ") enc.SetIndent("", " ")
err := enc.Encode(rf) err := enc.Encode(rf)