run golangci-lint in CI

This commit is contained in:
Krystian Chmura committed 2024-05-11 14:41:25 +02:00
1 parent 36f353b8a6
commit 03865f9b94
8 files changed
+66 -49

No files matched your search

-10
View File
@@ -20,15 +20,11 @@ package savedata
import (
"fmt"
"log"
"strconv"
"github.com/klauspost/compress/zstd"
"github.com/pagefaultgames/rogueserver/db"
"github.com/pagefaultgames/rogueserver/defs"
)
var zstdEncoder, _ = zstd.NewWriter(nil)
// /savedata/update - update save data
func Update(uuid []byte, slot int, save any) error {
err := db.UpdateAccountLastActivity(uuid)
@@ -62,12 +58,6 @@ func Update(uuid []byte, slot int, save any) error {
if slot < 0 || slot >= defs.SessionSlotCount {
return fmt.Errorf("slot id %d out of range", slot)
}
filename := "session"
if slot != 0 {
filename += strconv.Itoa(slot)
}
return db.StoreSessionSaveData(uuid, save, slot)
default: