distribution: fix non-constant format string

caught by go1.24

    # github.com/docker/docker/distribution
    # github.com/docker/docker/distribution/pull_v2_windows.go:145:35: non-constant format string in call to (*github.com/docker/docker/vendor/github.com/sirupsen/logrus.Entry).Debugf
    FAIL    github.com/docker/docker/distribution [build failed]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8c96e45375)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-01-02 22:01:56 +01:00
parent 9cf331393c
commit 17e8cb2b06

View File

@@ -143,7 +143,7 @@ func checkImageCompatibility(imageOS, imageOSVersion string) error {
if imageOSBuild, err := strconv.Atoi(splitImageOSVersion[2]); err == nil {
if imageOSBuild > int(hostOSV.Build) {
errMsg := fmt.Sprintf("a Windows version %s.%s.%s-based image is incompatible with a %s host", splitImageOSVersion[0], splitImageOSVersion[1], splitImageOSVersion[2], hostOSV.ToString())
log.G(context.TODO()).Debugf(errMsg)
log.G(context.TODO()).Debug(errMsg)
return errors.New(errMsg)
}
}