layer: use strconv instead of fmt.Sprintf()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-10-05 16:37:26 +02:00
parent 838fc976c8
commit c3a5641132
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 3 deletions

View File

@ -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 {