From 35fbd2799637a2ad8679d485a2dffdafc1ac4e01 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 11 Jan 2025 06:16:31 -0600 Subject: [PATCH] Notes added by 'git notes append' --- b548c280a63c78118468e95064806f0d1ec1509b | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/b548c280a63c78118468e95064806f0d1ec1509b b/b548c280a63c78118468e95064806f0d1ec1509b index c462bbb..8db5ef5 100644 --- a/b548c280a63c78118468e95064806f0d1ec1509b +++ b/b548c280a63c78118468e95064806f0d1ec1509b @@ -1208,3 +1208,58 @@ func (all *GoDeps) FindByGoPath(s string) *GoDep { } // `autogen:repo.marshal.pb.go` + +// Code generated by go.wit.com/apps/autogenpb DO NOT EDIT. +// This file was autogenerated with autogenpb v0.0.38-3-g25ae7fc 2025.01.10_0403 +// go install go.wit.com/apps/autogenpb@latest +// +// define which structs (messages) you want to use in the .proto file +// Then sort.pb.go and marshal.pb.go files are autogenerated +// +// autogenpb uses it and has an example .proto file with instructions +// + +package gitpb + +import ( + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/encoding/prototext" + "google.golang.org/protobuf/proto" +) + +// human readable JSON +func (v *Repos) FormatJSON() string { + return protojson.Format(v) +} + +// marshal json +func (v *Repos) MarshalJSON() ([]byte, error) { + return protojson.Marshal(v) +} + +// unmarshal json +func (v *Repos) UnmarshalJSON(data []byte) error { + return protojson.Unmarshal(data, v) +} + +// apparently this isn't stable, but it's awesomely better +// https://protobuf.dev/reference/go/faq/#unstable-text +// it's brilliant for config files! +func (v *Repos) FormatTEXT() string { + return prototext.Format(v) +} + +// unmarshalTEXT. This reads the .text config file back in after the user edits it +func (v *Repos) UnmarshalTEXT(data []byte) error { + return prototext.Unmarshal(data, v) +} + +// marshal to wire. This is called winning. +func (v *Repos) Marshal() ([]byte, error) { + return proto.Marshal(v) +} + +// unmarshal from wire. You have won. +func (v *Repos) Unmarshal(data []byte) error { + return proto.Unmarshal(data, v) +}