Skip to content

Commit

Permalink
refactor: Remove dependency on encoding/json, use struct- instead o…
Browse files Browse the repository at this point in the history
…f array-based wire format
  • Loading branch information
pojntfx committed Oct 16, 2023
1 parent d61bf81 commit d167e28
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 84 deletions.
4 changes: 4 additions & 0 deletions cmd/dudirekta-example-frisbee-client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"encoding/json"
"flag"
"fmt"
"log"
Expand Down Expand Up @@ -157,6 +158,9 @@ func main() {

return b, nil
},

json.Marshal,
json.Unmarshal,
); err != nil && !utils.IsClosedErr(err) {
panic(err)
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/dudirekta-example-frisbee-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"context"
"encoding/json"
"flag"
"log"
"net"
Expand Down Expand Up @@ -215,6 +216,9 @@ func main() {

return b, nil
},

json.Marshal,
json.Unmarshal,
); err != nil && !utils.IsClosedErr(err) {
panic(err)
}
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/loopholelabs/common v0.4.9 h1:9MPUYlZZ/qx3Kt8LXgXxcSXthrM91od8026c4DlGpAU=
github.com/loopholelabs/common v0.4.9/go.mod h1:Wop5srN1wYT+mdQ9gZ+kn2I9qKAyVd0FB48pThwIa9M=
github.com/loopholelabs/frisbee-go v0.7.2 h1:Gk8yfz2LDN3bTjQ1OQZa+4sAk9WQkHA6j1SuAzIp42A=
github.com/loopholelabs/frisbee-go v0.7.2/go.mod h1:p1VQ3R4mYOKHZ/J52jgogfOawTm0hOZLXnRGBKhF9e0=
github.com/loopholelabs/polyglot v1.1.2 h1:9JE1m/IL8rgWIlykvebz98i4tjOGNOpgGIB3CqbfvrE=
github.com/loopholelabs/polyglot v1.1.2/go.mod h1:EA88BEkIluKHAWxhyOV88xXz68YkRdo9IzZ+1dj+7Ao=
github.com/loopholelabs/testing v0.2.3 h1:4nVuK5ctaE6ua5Z0dYk2l7xTFmcpCYLUeGjRBp8keOA=
Expand Down
Loading

0 comments on commit d167e28

Please sign in to comment.