summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-10 15:34:12 -0500
committerJeff Carr <[email protected]>2025-10-10 15:34:12 -0500
commita4918390cb47f409476fe4135009ffe4d5255375 (patch)
tree91699e36590de872845d30a7a908d9a45c545e8a
parent159bdc8379d0565bbb7a2a6d56e78ad365303bc0 (diff)
attempt to identify PB by version & uuidv0.0.19
-rw-r--r--load.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/load.go b/load.go
index 1fe1a50..160bd0e 100644
--- a/load.go
+++ b/load.go
@@ -9,6 +9,7 @@ import (
"path/filepath"
"strings"
+ "go.wit.com/lib/protobuf/filepb"
"go.wit.com/log"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/prototext"
@@ -99,6 +100,13 @@ func Load(pb proto.Message) error {
}
if strings.HasSuffix(fullname, ".pb") {
if err := loadPB(pb, fullname); err != nil {
+ pbuuid, pbver, pberr := filepb.IdentifyPB(fullname)
+ if pberr != nil {
+ return pberr
+ }
+ log.Info("your version :", ver)
+ log.Info("pb version is:", pbver)
+ log.Info("pb uuid is:", pbuuid)
return err
}
worked = true