diff --git a/internal/gaby/actionlog.go b/internal/gaby/actionlog.go
index e81581d..d1b96a3 100644
--- a/internal/gaby/actionlog.go
+++ b/internal/gaby/actionlog.go
@@ -272,7 +272,7 @@
Approved: decision == "Approve",
}
actions.AddDecision(g.db, kind, key, d)
- return []byte(fmt.Sprintf("decision: %+v", d)), http.StatusOK, nil
+ return fmt.Appendf(nil, "decision: %+v", d), http.StatusOK, nil
}
func (g *Gaby) handleActionRerun(w http.ResponseWriter, r *http.Request) {
diff --git a/internal/pebble/pebble_test.go b/internal/pebble/pebble_test.go
index 56a93ed..a2b7a78 100644
--- a/internal/pebble/pebble_test.go
+++ b/internal/pebble/pebble_test.go
@@ -66,7 +66,7 @@
binary.BigEndian.PutUint64(val[i:], pcg.Uint64())
}
binary.BigEndian.PutUint64(val, uint64(key))
- b.Set([]byte(fmt.Sprint(key)), val)
+ b.Set(fmt.Append(nil, key), val)
if b.MaybeApply() {
if applied++; applied == 2 {
break
@@ -76,7 +76,7 @@
b.Apply()
for key := range 200 {
- val, ok := db.Get([]byte(fmt.Sprint(key)))
+ val, ok := db.Get(fmt.Append(nil, key))
if !ok {
t.Fatalf("after batch, missing key %d", key)
}
diff --git a/internal/storage/test.go b/internal/storage/test.go
index e56acd1..8e9ddd8 100644
--- a/internal/storage/test.go
+++ b/internal/storage/test.go
@@ -42,7 +42,7 @@
b := db.Batch()
for i := range 10 {
- b.Set(ordered.Encode(i), []byte(fmt.Sprint(i)))
+ b.Set(ordered.Encode(i), fmt.Append(nil, i))
b.MaybeApply()
}
b.Apply()
@@ -102,7 +102,7 @@
b = db.Batch()
for i := range 5 {
b.Delete(ordered.Encode(i))
- b.Set(ordered.Encode(2*i), []byte(fmt.Sprint(2*i)))
+ b.Set(ordered.Encode(2*i), fmt.Append(nil, 2*i))
}
b.DeleteRange(ordered.Encode(0), ordered.Encode(0))
b.Apply()