code: func newestRecord(moduleVersions []moduleRecord, constraint string) (moduleRecord, error) {
  	var versions []string
  	modules := make(map[string]moduleRecord)
  
  	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 moduleRecord that matches the given constraint