summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--patch.common.go13
-rw-r--r--patch.proto2
2 files changed, 14 insertions, 1 deletions
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`
}