Add staticcheck to CI steps
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4ef5dc4189
commit
57516c738e
|
@ -8,6 +8,8 @@ steps:
|
||||||
image: golang:1.17
|
image: golang:1.17
|
||||||
commands:
|
commands:
|
||||||
- cd backend/
|
- cd backend/
|
||||||
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||||
- go build ./...
|
- go build ./...
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
- staticcheck ./...
|
||||||
- go test -bench=. -benchmem -cover ./...
|
- go test -bench=. -benchmem -cover ./...
|
||||||
|
|
|
@ -54,7 +54,7 @@ func (s *FileSystemStore) GetObjectWithRange(ctx context.Context, key string, st
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error opening file: %v", err)
|
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 {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error seeking in file: %v", err)
|
return nil, fmt.Errorf("error seeking in file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,11 +20,6 @@ import (
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
getVideoExpiresIn = time.Hour
|
|
||||||
getAudioExpiresIn = time.Hour
|
|
||||||
)
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
rawAudioCodec = "pcm_s16le"
|
rawAudioCodec = "pcm_s16le"
|
||||||
rawAudioFormat = "s16le"
|
rawAudioFormat = "s16le"
|
||||||
|
@ -578,7 +573,6 @@ func (s *MediaSetService) getThumbnailFromYoutube(ctx context.Context, mediaSet
|
||||||
type progressReader struct {
|
type progressReader struct {
|
||||||
io.Reader
|
io.Reader
|
||||||
|
|
||||||
label string
|
|
||||||
total, exp int64
|
total, exp int64
|
||||||
logger *zap.SugaredLogger
|
logger *zap.SugaredLogger
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue