code: func (v VersionsFile) ResolveVersion(pkg, ver string) (common.Pin, error) {
  	if common.ValidateInstanceID(ver, common.AnyHash) == nil {
  		return common.Pin{PackageName: pkg, InstanceID: ver}, nil
  	}
  	if iid, ok := v[unresolvedVer{pkg, ver}]; ok {
  		return common.Pin{PackageName: pkg, InstanceID: iid}, nil
  	}
  	return common.Pin{}, errors.Reason("not in the versions file").Err()
  }
docs: // ResolveVersion returns a pin matching the given version or an error if such
  // version is not in the map.
  //
  // If 'ver' is already an instance ID, returns it right away.