summaryrefslogtreecommitdiff
path: root/layer/filestore.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-10-05 16:37:26 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-10-08 19:15:28 +0200
commitc3a5641132850e4772cb71ee61219d37df082168 (patch)
tree46b69d3fcf00454352420bb8a7cb515befd229f8 /layer/filestore.go
parent838fc976c82c5d09e622cdf275ebd4032e06819c (diff)
downloaddocker-c3a5641132850e4772cb71ee61219d37df082168.tar.gz
layer: use strconv instead of fmt.Sprintf()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'layer/filestore.go')
-rw-r--r--layer/filestore.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/layer/filestore.go b/layer/filestore.go
index 97307c24fa..19990a3681 100644
--- a/layer/filestore.go
+++ b/layer/filestore.go
@@ -3,7 +3,6 @@ package layer // import "github.com/docker/docker/layer"
import (
"compress/gzip"
"encoding/json"
- "fmt"
"io"
"os"
"path/filepath"
@@ -82,8 +81,7 @@ func (fms *fileMetadataStore) StartTransaction() (*fileMetadataTransaction, erro
}
func (fm *fileMetadataTransaction) SetSize(size int64) error {
- content := fmt.Sprintf("%d", size)
- return fm.ws.WriteFile("size", []byte(content), 0644)
+ return fm.ws.WriteFile("size", []byte(strconv.FormatInt(size, 10)), 0o644)
}
func (fm *fileMetadataTransaction) SetParent(parent ChainID) error {