code: func (r *Route) computePatternStr(patternString string, hasWildcard bool, key string) (string, error) {
  	regexPattern := ""
  	patternKey := ""
  	if hasWildcard {
  		patternKey = fmt.Sprintf(":%s*", key)
  		regexPattern = urlwildcard
  	} else {
  		patternKey = fmt.Sprintf(":%s", key)
  		regexPattern = urlchars
  	}
  
  	patternString = strings.Replace(patternString, patternKey, regexPattern, 1)
  
  	for idx, k := range r.uriKeys {
  		if key == k {
  			return "", errors.New(
  				fmt.Sprintf(
  					"%s\nURI:%s\nKey:%s, Position: %d",
  					errDuplicateKey,
  					r.Pattern,
  					k,
  					idx+1,
  				),
  			)
  		}
  	}
  
  	r.uriKeys = append(r.uriKeys, key)
  	return patternString, nil
  }
docs: // computePatternStr computes the pattern string required for generating the route's regex.
  // It also adds the URI parameter key to the route's `keys` field