func (c *Client) EndPoint(parts ...string) *url.URL {
	up := []string{apiVersion, "Accounts", c.AccountSid}
	up = append(up, parts...)
	u, _ := url.Parse(strings.Join(up, "/"))
	u.Path = fmt.Sprintf("/%s.%s", u.Path, apiFormat)
	return u
}
Constructing API endpoint. This will returns an *url.URL. Here's the example:

c := NewClient("1234567", "token", nil)
c.EndPoint("Messages", "abcdef") // "/2010-04-01/Accounts/1234567/Messages/abcdef.json"
package twilio
import (
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"strings"
)
type Client struct {
	client *http.Client
	UserAgent string
	BaseURL *url.URL
	AccountSid string
	AuthToken  string
	Messages *MessageService
}
func NewClient(accountSid, authToken string, httpClient *http.Client) *Client {
	if httpClient == nil {
		httpClient = http.DefaultClient
	}
	baseURL, _ := url.Parse(apiBaseURL)
	c := &Client{
		client:     httpClient,
		UserAgent:  userAgent,
		BaseURL:    baseURL,
		AccountSid: accountSid,
		AuthToken:  authToken,
	}
	c.Messages = &MessageService{client: c}
	return c
}