code: func modulePath(mod []byte) string {
  	for len(mod) > 0 {
  		line := mod
  		mod = nil
  		if i := bytes.IndexByte(line, '\n'); i >= 0 {
  			line, mod = line[:i], line[i+1:]
  		}
  		if i := bytes.Index(line, slashSlash); i >= 0 {
  			line = line[:i]
  		}
  		line = bytes.TrimSpace(line)
  		if !bytes.HasPrefix(line, moduleStr) {
  			continue
  		}
  		line = line[len(moduleStr):]
  		n := len(line)
  		line = bytes.TrimSpace(line)
  		if len(line) == n || len(line) == 0 {
  			continue
  		}
  
  		if line[0] == '"' || line[0] == '`' {
  			p, err := strconv.Unquote(string(line))
  			if err != nil {
  				return "" // malformed quoted string or multiline module path
  			}
  			return p
  		}
  
  		return string(line)
  	}
  	return "" // missing module path
  }
docs: // Copied from cmd/go/internal/modfile/read.go