libnetwork: resolvconf: remove var that shadowed import

It was only used in a single place, so we can remove the
intermediate variable.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-08-19 14:54:46 +02:00
parent d8f079deb6
commit afdfc04e10

View File

@@ -377,8 +377,7 @@ func (rc *ResolvConf) WriteFile(path, hashPath string, perm os.FileMode) error {
}
defer hashFile.Close()
digest := digest.FromBytes(content)
if _, err = hashFile.Write([]byte(digest)); err != nil {
if _, err = hashFile.Write([]byte(digest.FromBytes(content))); err != nil {
return err
}
}