Skip to content

Commit

Permalink
fix indentation for in-toto and traces
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi committed Dec 16, 2022
1 parent 4b220de commit 61a1e33
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exporter/local/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func CreateFS(ctx context.Context, sessionID string, k string, ref cache.Immutab

names := map[string]struct{}{}
for i, stmt := range stmts {
dt, err := json.Marshal(stmt)
dt, err := json.MarshalIndent(stmt, "", " ")
if err != nil {
return nil, nil, errors.Wrap(err, "failed to marshal attestation")
}
Expand Down
2 changes: 1 addition & 1 deletion solver/llbsolver/provenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ type resultRequests struct {
platforms []exptypes.Platform
}

// filterImagePlatforms filter out images that not for the current platform if an image existist for every platform in a result
// filterImagePlatforms filter out images that not for the current platform if an image exists for every platform in a result
func (reqs *resultRequests) filterImagePlatforms(k string, imgs []provenance.ImageSource) []provenance.ImageSource {
if len(reqs.platforms) == 0 {
return imgs
Expand Down
1 change: 1 addition & 0 deletions solver/llbsolver/solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ func (s *Solver) recordBuildHistory(ctx context.Context, id string, req frontend
return err
}
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
for _, sp := range spans {
if err := enc.Encode(sp); err != nil {
return err
Expand Down

0 comments on commit 61a1e33

Please sign in to comment.