refactor: remove tautological nil check for publicKey in InspectDataHandler

This commit is contained in:
asamuj 2025-07-21 15:11:09 +08:00
parent e909be6380
commit eff39d0993
1 changed files with 2 additions and 4 deletions

View File

@ -3334,10 +3334,8 @@ func (a adminAPIHandlers) InspectDataHandler(w http.ResponseWriter, r *http.Requ
// Write a version for making *incompatible* changes.
// The AdminClient will reject any version it does not know.
if publicKey == nil {
w.Write([]byte{1})
w.Write(key[:])
}
w.Write([]byte{1})
w.Write(key[:])
stream, err := sio.AES_256_GCM.Stream(key[:])
if err != nil {