Skip to content

Commit

Permalink
Fix go testings
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Feb 27, 2024
1 parent a331ca8 commit 09d9279
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/pkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ func validatePkgPath(pathname string) (pkg Pkg, extraQuery string, err error) {
}
}

p, _, err := getPackageInfo("", pkgName, version)
if err == nil {
pkg.Version = p.Version
pkg.Deprecated = p.Deprecated
if cfg != nil {
p, _, err := getPackageInfo("", pkgName, version)
if err == nil {
pkg.Version = p.Version
pkg.Deprecated = p.Deprecated
}
}
return
}
Expand Down

0 comments on commit 09d9279

Please sign in to comment.