code: func ModuleFromPath(path string, addGopathToPath bool) (module *Module) {
  	path = filepath.ToSlash(path)
  	gopathList := filepath.SplitList(build.Default.GOPATH)
  	// Strip away the vendor folder
  	if i := strings.Index(path, "/vendor/"); i > 0 {
  		path = path[i+len("vendor/"):]
  	}
  
  	// See if the path exists in the module based
  	for i := range Modules {
  		if addGopathToPath {
  			for _, gopath := range gopathList {
  				if strings.Contains(filepath.ToSlash(filepath.Clean(filepath.Join(gopath, "src", path))), Modules[i].Path) {
  					module = Modules[i]
  					break
  				}
  			}
  		} else {
  			if strings.Contains(path, Modules[i].ImportPath) {
  				module = Modules[i]
  				break
  			}
  
  		}
  
  		if module != nil {
  			break
  		}
  	}
  	// Default to the app module if not found
  	if module == nil {
  		module = appModule
  	}
  	return
  }
docs: // Based on the full path given return the relevant module
  // Only to be used on initialization