Browse Source

fixed bug for windows

pull/103/head
Lunny Xiao 11 years ago
parent
commit
56f5a6bce1
  1. 15
      cmd/gopath.go

15
cmd/gopath.go

@ -44,19 +44,20 @@ func getGopmPkgs(dirPath string, isTest bool) (pkgs map[string]*doc.Pkg, err err
if !doc.IsGoRepoPath(name) {
if builds != nil {
if info, ok := builds[name]; ok {
// Check version.
if i := strings.Index(info, ":"); i > -1 {
// Check version. there should chek
// local first because d:\ contains :
if com.IsDir(info) {
pkgs[name] = &doc.Pkg{
ImportPath: name,
Type: info[:i],
Value: info[i+1:],
Type: doc.LOCAL,
Value: info,
}
continue
} else if com.IsDir(info) {
} else if i := strings.Index(info, ":"); i > -1 {
pkgs[name] = &doc.Pkg{
ImportPath: name,
Type: doc.LOCAL,
Value: info,
Type: info[:i],
Value: info[i+1:],
}
continue
}

Loading…
Cancel
Save