Skip to content

Commit

Permalink
Simplify the code a bit, undo irrelevant change
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Jan 23, 2024
1 parent 45ce1e8 commit 8cac4d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion historyarchive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (a *Archive) PutPathHAS(path string, has HistoryArchiveState, opts *Command
return err
}
if exists && !opts.Force {
log.Info("skipping existing " + path)
log.Printf("skipping existing " + path)
return nil
}
buf, err := json.MarshalIndent(has, "", " ")
Expand Down
4 changes: 1 addition & 3 deletions historyarchive/archive_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ type ArchiveBucketCache struct {
// MakeArchiveBucketCache creates a cache on the disk at the given path that
// acts as an LRU cache, mimicking a particular upstream.
func MakeArchiveBucketCache(opts CacheOptions) (*ArchiveBucketCache, error) {
var log_ *log.Entry
log_ := opts.Log
if opts.Log == nil {
log_ = log.WithField("subservice", "fs-cache")
} else {
log_ = opts.Log
}
log_ = log_.
WithField("path", opts.Path).
Expand Down

0 comments on commit 8cac4d3

Please sign in to comment.