Enable static checks

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2018-08-06 14:34:15 -07:00
parent 32e2260be2
commit db0a4ec1c8
33 changed files with 116 additions and 96 deletions

View File

@@ -7,7 +7,6 @@ import (
"fmt"
"io"
"io/ioutil"
"os"
storagedriver "github.com/docker/distribution/registry/storage/driver"
)
@@ -81,12 +80,12 @@ func (fr *fileReader) Seek(offset int64, whence int) (int64, error) {
newOffset := fr.offset
switch whence {
case os.SEEK_CUR:
newOffset += int64(offset)
case os.SEEK_END:
newOffset = fr.size + int64(offset)
case os.SEEK_SET:
newOffset = int64(offset)
case io.SeekCurrent:
newOffset += offset
case io.SeekEnd:
newOffset = fr.size + offset
case io.SeekStart:
newOffset = offset
}
if newOffset < 0 {