Skip to content

Commit

Permalink
refactor(getLocalMeta): Use IsDelegatedTargetsManifest to filter out …
Browse files Browse the repository at this point in the history
…top metas

Signed-off-by: Baptiste Foy <baptiste.foy@datadoghq.com>
  • Loading branch information
BaptisteFoy authored and trishankatdatadog committed Oct 12, 2022
1 parent 32b5269 commit 7b23658
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"

"github.com/theupdateframework/go-tuf/data"
"github.com/theupdateframework/go-tuf/internal/roles"
"github.com/theupdateframework/go-tuf/util"
"github.com/theupdateframework/go-tuf/verify"
)
Expand Down Expand Up @@ -425,10 +426,7 @@ func (c *Client) getLocalMeta() error {
}

for fileName := range meta {
if fileName != "targets.json" &&
fileName != "snapshot.json" &&
fileName != "root.json" &&
fileName != "timestamp.json" {
if roles.IsDelegatedTargetsManifest(fileName) {
c.localMeta[fileName] = meta[fileName]
}
}
Expand Down

0 comments on commit 7b23658

Please sign in to comment.