mirror of
https://github.com/containers/skopeo.git
synced 2025-04-27 11:01:18 +00:00
Simplify a condition
golangci-lint linter: ifshort Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
e7ab33e65f
commit
2a7b132790
@ -576,8 +576,7 @@ func matchLayerBlobBinaryType(c *check.C, ociImageDirPath string, contentType st
|
||||
|
||||
func getFileContentType(out *os.File) (string, error) {
|
||||
buffer := make([]byte, 512)
|
||||
_, err := out.Read(buffer)
|
||||
if err != nil {
|
||||
if _, err := out.Read(buffer); err != nil {
|
||||
return "", err
|
||||
}
|
||||
contentType := http.DetectContentType(buffer)
|
||||
|
Loading…
Reference in New Issue
Block a user