Skip to content

Commit

Permalink
Remove more unused functions
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Lowman <[email protected]>
  • Loading branch information
ethan-lowman-dd committed Aug 24, 2022
1 parent fb8ad85 commit 5c04ac0
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -778,38 +778,6 @@ func (c *Client) localMetaFromSnapshot(name string, m data.SnapshotFileMeta) (js
return b, err == nil
}

// hasTargetsMeta checks whether local metadata has the given snapshot meta
//
//lint:ignore U1000 unused
func (c *Client) hasTargetsMeta(m data.SnapshotFileMeta) bool {
b, ok := c.localMeta["targets.json"]
if !ok {
return false
}
meta, err := util.GenerateSnapshotFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...)
if err != nil {
return false
}
err = util.SnapshotFileMetaEqual(meta, m)
return err == nil
}

// hasSnapshotMeta checks whether local metadata has the given meta
//
//lint:ignore U1000 unused
func (c *Client) hasMetaFromTimestamp(name string, m data.TimestampFileMeta) bool {
b, ok := c.localMeta[name]
if !ok {
return false
}
meta, err := util.GenerateTimestampFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...)
if err != nil {
return false
}
err = util.TimestampFileMetaEqual(meta, m)
return err == nil
}

type Destination interface {
io.Writer
Delete() error
Expand Down

0 comments on commit 5c04ac0

Please sign in to comment.