run golangci-lint in CI
This commit is contained in:
8 files changed
+66
-49
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user