summaryrefslogtreecommitdiff
path: root/identify.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-08 11:18:56 -0500
committerJeff Carr <[email protected]>2025-10-08 11:18:56 -0500
commitb82e6b44dd7fa0522fa124314aa5a48d067c2976 (patch)
tree20350b002066fd8e40f359f5240527c63663ee28 /identify.go
parentd82353457849bd574f028694e4e1e8a37b54ac4b (diff)
jeezv0.0.3
Diffstat (limited to 'identify.go')
-rw-r--r--identify.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/identify.go b/identify.go
index 60ea616..52f144f 100644
--- a/identify.go
+++ b/identify.go
@@ -1,18 +1,24 @@
package filepb
+import (
+ "os"
+
+ "go.wit.com/log"
+)
+
// print the protobuf in human form
func IdentifyPB(filename string) (string, string, error) {
data, err := os.ReadFile(filename)
if err != nil {
// log.Info("open config file :", err)
- return "os.ReadFile()", err
+ return "", "", err
}
var pb *Identify
pb = new(Identify)
if err := pb.Unmarshal(data); err != nil {
- return "Unmarshal(data)", err
+ return "", "", err
}
log.Info("Identify protobuf file uuid =", pb.Uuid, "version =", pb.Version)
- return pb.uuid, pb.Version, nil
+ return pb.Uuid, pb.Version, nil
}