diff options
Diffstat (limited to 'identify.go')
| -rw-r--r-- | identify.go | 12 |
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 } |
