code: func (c *requestCache) uniqueToken() (string, error) {
  	const maxTries = 10
  	// Number of bytes to be tokenLen when base64 encoded.
  	tokenSize := math.Ceil(float64(tokenLen) * 6 / 8)
  	rawToken := make([]byte, int(tokenSize))
  	for i := 0; i < maxTries; i++ {
  		if _, err := rand.Read(rawToken); err != nil {
  			return "", err
  		}
  		encoded := base64.RawURLEncoding.EncodeToString(rawToken)
  		token := encoded[:tokenLen]
  		// If it's unique, return it. Otherwise retry.
  		if _, exists := c.tokens[encoded]; !exists {
  			return token, nil
  		}
  	}
  	return "", fmt.Errorf("failed to generate unique token")
  }
docs: // uniqueToken generates a random URL-safe token and ensures uniqueness.