Fix go vet issue
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2024-06-18 18:34:54 +02:00
parent a4df681f88
commit 00b605123b
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ steps:
commands: commands:
- apk --no-cache add alsa-lib-dev build-base git pkgconf - apk --no-cache add alsa-lib-dev build-base git pkgconf
- go get -v -d - go get -v -d
- go vet -v - go vet -v -tags pulse
- go build -tags pulse -ldflags '-w -X main.Version=${DRONE_BRANCH}-${DRONE_COMMIT} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} - go build -tags pulse -ldflags '-w -X main.Version=${DRONE_BRANCH}-${DRONE_COMMIT} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
- ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} reveil - ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} reveil
when: when:
@ -39,7 +39,7 @@ steps:
commands: commands:
- apk --no-cache add alsa-lib-dev build-base git pkgconf - apk --no-cache add alsa-lib-dev build-base git pkgconf
- go get -v -d - go get -v -d
- go vet -v - go vet -v -tags pulse
- go build -tags pulse -ldflags '-w -X main.Version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 - go build -tags pulse -ldflags '-w -X main.Version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -o deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
- ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 reveil - ln deploy/reveil-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 reveil
when: when:

View File

@ -23,7 +23,7 @@ func NewLevelDBStorage(path string) (s *LevelDBStorage, err error) {
db, err = leveldb.OpenFile(path, nil) db, err = leveldb.OpenFile(path, nil)
if err != nil { if err != nil {
if _, ok := err.(*errors.ErrCorrupted); ok { if _, ok := err.(*errors.ErrCorrupted); ok {
log.Println("LevelDB was corrupted; attempting recovery (%s)", err.Error()) log.Printf("LevelDB was corrupted; attempting recovery (%s)", err.Error())
_, err = leveldb.RecoverFile(path, nil) _, err = leveldb.RecoverFile(path, nil)
if err != nil { if err != nil {
return return