code: func (s *PutScriptService) buildURL() (string, string, url.Values, error) {
  	var (
  		err    error
  		method = "PUT"
  		path   string
  	)
  
  	if s.context != "" {
  		path, err = uritemplates.Expand("/_scripts/{id}/{context}", map[string]string{
  			"id":      s.id,
  			"context": s.context,
  		})
  	} else {
  		path, err = uritemplates.Expand("/_scripts/{id}", map[string]string{
  			"id": s.id,
  		})
  	}
  	if err != nil {
  		return "", "", url.Values{}, err
  	}
  
  	// Add query string parameters
  	params := url.Values{}
  	if s.pretty {
  		params.Set("pretty", "true")
  	}
  	if s.timeout != "" {
  		params.Set("timeout", s.timeout)
  	}
  	if s.masterTimeout != "" {
  		params.Set("master_timestamp", s.masterTimeout)
  	}
  	return method, path, params, nil
  }
docs: // buildURL builds the URL for the operation.