Add staticcheck to CI steps
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Rob Watson 2021-12-13 21:30:37 +01:00
parent 4ef5dc4189
commit 57516c738e
3 changed files with 3 additions and 7 deletions

View File

@ -8,6 +8,8 @@ steps:
image: golang:1.17
commands:
- cd backend/
- go install honnef.co/go/tools/cmd/staticcheck@latest
- go build ./...
- go vet ./...
- staticcheck ./...
- go test -bench=. -benchmem -cover ./...

View File

@ -54,7 +54,7 @@ func (s *FileSystemStore) GetObjectWithRange(ctx context.Context, key string, st
if err != nil {
return nil, fmt.Errorf("error opening file: %v", err)
}
_, err = fptr.Seek(start, os.SEEK_SET)
_, err = fptr.Seek(start, io.SeekStart)
if err != nil {
return nil, fmt.Errorf("error seeking in file: %v", err)
}

View File

@ -20,11 +20,6 @@ import (
"go.uber.org/zap"
)
const (
getVideoExpiresIn = time.Hour
getAudioExpiresIn = time.Hour
)
const (
rawAudioCodec = "pcm_s16le"
rawAudioFormat = "s16le"
@ -578,7 +573,6 @@ func (s *MediaSetService) getThumbnailFromYoutube(ctx context.Context, mediaSet
type progressReader struct {
io.Reader
label string
total, exp int64
logger *zap.SugaredLogger
}