1
0
Fork 0

Use new Encoder everywhere

master
Philip O'Toole 2 years ago
parent a54653e7e6
commit e74bfc182a

@ -1,6 +1,7 @@
## 7.11.0 (unreleased)
### New features
- [PR #1114](https://github.com/rqlite/rqlite/pull/1114): Support automatically removing non-reachable nodes after a configurable period. Fixes [issue #728](https://github.com/rqlite/rqlite/issues/728).
- [PR #1116](https://github.com/rqlite/rqlite/pull/1116): Support associative form for query responses. Fixes [issue #1115](https://github.com/rqlite/rqlite/issues/1115).
## 7.10.1 (November 11th 2022)

@ -422,7 +422,8 @@ func loadRequest(b []byte) *command.LoadRequest {
}
func asJSON(v interface{}) string {
b, err := encoding.JSONMarshal(v)
enc := encoding.Encoder{}
b, err := enc.JSONMarshal(v)
if err != nil {
panic(fmt.Sprintf("failed to JSON marshal value: %s", err.Error()))
}

@ -1890,7 +1890,8 @@ func mustQuery(db *DB, stmt string) {
}
func asJSON(v interface{}) string {
b, err := encoding.JSONMarshal(v)
enc := encoding.Encoder{}
b, err := enc.JSONMarshal(v)
if err != nil {
panic(fmt.Sprintf("failed to JSON marshal value: %s", err.Error()))
}

@ -2182,7 +2182,8 @@ func waitForLeaderID(s *Store, timeout time.Duration) (string, error) {
}
func asJSON(v interface{}) string {
b, err := encoding.JSONMarshal(v)
enc := encoding.Encoder{}
b, err := enc.JSONMarshal(v)
if err != nil {
panic(fmt.Sprintf("failed to JSON marshal value: %s", err.Error()))
}

@ -734,7 +734,8 @@ func mustParseDuration(d string) time.Duration {
}
func asJSON(v interface{}) string {
b, err := encoding.JSONMarshal(v)
enc := encoding.Encoder{}
b, err := enc.JSONMarshal(v)
if err != nil {
panic(fmt.Sprintf("failed to JSON marshal value: %s", err.Error()))
}

Loading…
Cancel
Save