Skip to content

Commit

Permalink
feat: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-elliott committed Jun 9, 2024
1 parent 80e612f commit 0630c8c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion metadata/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (d *Decoder) Parse(payload *PayloadJSON) (metadata *Metadata, err error) {
}

if n := len(metadata.Unparsed); n != 0 && !d.ignoreEntryParsingErrors {
return metadata, fmt.Errorf("error occured parsing metadata: %d entries had errors during parsing", n)
return metadata, fmt.Errorf("error occurred parsing metadata: %d entries had errors during parsing", n)
}

return metadata, nil
Expand Down
2 changes: 2 additions & 0 deletions metadata/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package metadata handles metadata validation instrumentation.
package metadata
2 changes: 1 addition & 1 deletion metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (j StatementJSON) Parse() (statement Statement, err error) {

if len(j.AaGUID) != 0 {
if aaguid, err = uuid.Parse(j.AaGUID); err != nil {
return statement, fmt.Errorf("error occurred parsing statement with description '%s': error occured parsing AAGUID value: %w", j.Description, err)
return statement, fmt.Errorf("error occurred parsing statement with description '%s': error occurred parsing AAGUID value: %w", j.Description, err)
}
}

Expand Down
5 changes: 2 additions & 3 deletions metadata/providers/cached/doc.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package cached

// The cached package handles a metadata.Provider implementation that both downloads and caches the MDS3 blob. This
// Package cached handles a metadata.Provider implementation that both downloads and caches the MDS3 blob. This
// effectively is the recommended provider in most instances as it's fairly robust. Alternatively we suggest
// implementing a similar provider that leverages the memory.Provider as an underlying element.
//
// This provider only specifically performs updates at the time it's initialized. It has no automatic update
// functionality. This may change in the future however if you want this functionality at this time we recommend making
// your own implementation.
package cached
5 changes: 2 additions & 3 deletions metadata/providers/memory/doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package memory

// The memory package handles a metadata.Provider implementation that solely exists in memory. It's intended as a basis
// Package memory handles a metadata.Provider implementation that solely exists in memory. It's intended as a basis
// for other providers and generally not recommended to use directly unless you're implementing your own logic to handle
// the download and potential caching of the MDS3 blob yourself.
package memory

0 comments on commit 0630c8c

Please sign in to comment.