From 66d2167271e39cd63d7b685e8b6974a394a06575 Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Tue, 22 Aug 2023 11:11:19 -0400 Subject: [PATCH] update version check --- utils.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index ccb6bbc..907a35f 100644 --- a/utils.go +++ b/utils.go @@ -19,6 +19,7 @@ package iceberg import ( "runtime/debug" + "strings" "golang.org/x/exp/constraints" ) @@ -29,9 +30,9 @@ func init() { version = "(unknown version)" if info, ok := debug.ReadBuildInfo(); ok { for _, dep := range info.Deps { - switch { - case dep.Path == "github.com/apache/iceberg/go/iceberg": + if strings.HasPrefix(dep.Path, "github.com/apache/iceberg-go") { version = dep.Version + break } } }