diff options
| author | Shulhan <ms@kilabit.info> | 2018-06-03 05:38:27 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2018-06-03 23:51:33 +0700 |
| commit | 1e310097a0340cafb56ef60c9b5f3075602a51f4 (patch) | |
| tree | 0a762334951a8969917feb4ede8b9d2071e93b22 | |
| parent | 304200da05077b2a0327c7c7a63989550ff4bae6 (diff) | |
| download | beku-1e310097a0340cafb56ef60c9b5f3075602a51f4.tar.xz | |
env.GetPackageFromDB(): use strings.HasPrefix to check import path
| -rw-r--r-- | env.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -236,7 +236,7 @@ func (env *Env) GetPackage(importPath string) (pkg *Package, err error) { // func (env *Env) GetPackageFromDB(importPath, remoteURL string) (int, *Package) { for x := 0; x < len(env.pkgs); x++ { - if importPath == env.pkgs[x].ImportPath { + if strings.HasPrefix(importPath, env.pkgs[x].ImportPath) { return x, env.pkgs[x] } |
