// versionError returns err wrapped in a ModuleError for p.path.
versionError returns err wrapped in a ModuleError for p.path.
// versionError returns err wrapped in a ModuleError for p . path .
func (p *proxyRepo) versionError(version string, err error) error {
	if version != "" && version != module.CanonicalVersion(version) {
		return &module.ModuleError{
			Path: p.path,
			Err: &module.InvalidVersionError{
				Version: version,
				Pseudo:  IsPseudoVersion(version),
				Err:     err,
			},
		}
	}
	return &module.ModuleError{
		Path:    p.path,
		Version: version,
		Err:     err,
	}
}
func ( p * proxyRepo ) versionError ( version string , err error ) error { if version != " " && version != module . CanonicalVersion ( version ) { return & module . ModuleError { Path : p . path , Err : & module . InvalidVersionError { Version : version , Pseudo : IsPseudoVersion ( version ) , Err : err , } , } } return & module . ModuleError { Path : p . path , Version : version , Err : err , } }
versionError returns err wrapped in a ModuleError for p.path.
versionError returns err wrapped in a ModuleError for p . path .