summaryrefslogtreecommitdiff
path: root/forgeConfig.marshal.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-29 13:27:32 -0600
committerJeff Carr <[email protected]>2024-11-29 13:27:32 -0600
commit84a042cb15b456e5e7c37fbc922395becf7f071d (patch)
tree5e7a4559e36b6de22644db8d53d875e6531ffe5d /forgeConfig.marshal.go
parentedd6b1d432eaa3506be23b31f0686812a6b9093c (diff)
autogenpb marshal * sort
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'forgeConfig.marshal.go')
-rw-r--r--forgeConfig.marshal.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/forgeConfig.marshal.go b/forgeConfig.marshal.go
deleted file mode 100644
index 63fa744..0000000
--- a/forgeConfig.marshal.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package forgepb
-
-// TODO: autogen this
-// functions to import and export the protobuf
-// data to and from config files
-
-import (
- "google.golang.org/protobuf/encoding/protojson"
- "google.golang.org/protobuf/encoding/prototext"
- "google.golang.org/protobuf/proto"
- // "google.golang.org/protobuf/proto"
-)
-
-// human readable JSON
-func (p *ForgeConfigs) FormatJSON() string {
- return protojson.Format(p)
-}
-
-// 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()
-// TODO: fix things so this is the default
-func (p *ForgeConfigs) FormatTEXT() string {
- return prototext.Format(p)
-}
-
-// unmarshalTEXT
-func (p *ForgeConfigs) UnmarshalTEXT(data []byte) error {
- return prototext.Unmarshal(data, p)
-}
-
-// marshal json
-func (p *ForgeConfigs) MarshalJSON() ([]byte, error) {
- return protojson.Marshal(p)
-}
-
-// unmarshal
-func (p *ForgeConfigs) UnmarshalJSON(data []byte) error {
- return protojson.Unmarshal(data, p)
-}
-
-// marshal to wire
-func (m *ForgeConfigs) Marshal() ([]byte, error) {
- return proto.Marshal(m)
-}
-
-// unmarshal from wire
-func (m *ForgeConfigs) Unmarshal(data []byte) error {
- return proto.Unmarshal(data, m)
-}