From dd844e1ef9cd144dbeb0af75348273ba83aac064 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 7 Oct 2025 02:37:14 -0500 Subject: rethinking this --- patch.common.go | 13 +++++++++++++ patch.proto | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 patch.common.go diff --git a/patch.common.go b/patch.common.go new file mode 100644 index 0000000..01d4cc1 --- /dev/null +++ b/patch.common.go @@ -0,0 +1,13 @@ +package forgepb + +import ( + "fmt" +) + +func (pb *Patch) Error(err any) error { + return fmt.Errorf("%v", err) +} + +func (pb *Patches) Error(err any) error { + return fmt.Errorf("%v", err) +} diff --git a/patch.proto b/patch.proto index 4517c26..aa06095 100644 --- a/patch.proto +++ b/patch.proto @@ -66,5 +66,5 @@ message Patches { // `autogenpb:marshal` string version = 2; // `autogenpb:version:v2.0.0` repeated Patch patches = 3; string filename = 4; // `autogenpb:save` -- this enables autogenerated pb.Load() and pb.Save() - string Error = 5; // when passing these around, if there is an error, store it here + string Errors = 5; // `autogenpb:error` } -- cgit v1.2.3