summaryrefslogtreecommitdiff
path: root/repos.marshal.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-29 16:22:19 -0600
committerJeff Carr <[email protected]>2024-11-29 16:22:19 -0600
commitbdcaba32f89cc635f39300aa213931c8eeffb909 (patch)
treebb4ed9ee2a7ba404d6a03dc48e7c7ddc62e7cdcf /repos.marshal.go
parent3359a4499644a0e59a0dd0f1c2c74ae688f0190a (diff)
autogenpb marshal.pb.go and sort.pb.go
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'repos.marshal.go')
-rw-r--r--repos.marshal.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/repos.marshal.go b/repos.marshal.go
deleted file mode 100644
index 738ae35..0000000
--- a/repos.marshal.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package gitpb
-
-// todo: autogen this
-// functions to import and export the protobuf
-
-import (
- "google.golang.org/protobuf/encoding/protojson"
- "google.golang.org/protobuf/encoding/prototext"
- "google.golang.org/protobuf/proto"
-)
-
-// human readable JSON
-func (r *Repo) FormatJSON() string {
- return protojson.Format(r)
-}
-
-// apparently this isn't supposed to be used?
-// https://protobuf.dev/reference/go/faq/#unstable-text
-// this is a shame because this is much nicer output than JSON Format()
-func (r *Repo) FormatTEXT() string {
- return prototext.Format(r)
-}
-
-// marshal json
-func (r *Repo) MarshalJSON() ([]byte, error) {
- return protojson.Marshal(r)
-}
-
-// unmarshal
-func (r *Repo) UnmarshalJSON(data []byte) error {
- return protojson.Unmarshal(data, r)
-}
-
-// marshal to wire
-func (r *Repo) Marshal() ([]byte, error) {
- return proto.Marshal(r)
-}
-
-// unmarshal from wire
-func (r *Repo) Unmarshal(data []byte) error {
- return proto.Unmarshal(data, r)
-}