code: func newestVersion(moduleVersions []*response.ModuleVersion, constraint string) (*response.ModuleVersion, error) {
  	var versions []string
  	modules := make(map[string]*response.ModuleVersion)
  
  	for _, m := range moduleVersions {
  		versions = append(versions, m.Version)
  		modules[m.Version] = m
  	}
  
  	match, err := newest(versions, constraint)
  	return modules[match], err
  }
docs: // return the newest *moduleVersion that matches the given constraint
  // TODO: reconcile these two types and newest* functions