使用Go根据RFC 1738编码URL字符串

I'm trying to send a request to Twitter through my Go application, and Twitter's API requires that you encode the consumer key and secret according to RFC 1738. Is there a Go function built to do this? From what I see in the net/url package, Go uses RFC 3986 by default, and I don't see any functions on http://golang.org/pkg/net/url/ that would allow me to convert to RFC 1738.

As a heads-up, I know that RFC 3986 is newer and obsoletes 1738, but the Twitter API asks specifically for RFC 1738 so I figured I should try to do that to avoid possibly getting screwed over by a corner case. For clarification, I'm talking about part 1 of the "Issuing application-only requests" section on this page: https://dev.twitter.com/docs/auth/application-only-auth

RFC 3986 updates RFC 1738. You can comply with RFC 1738 by complying with RFC 3986, and therefore achieve what Twitter expects.

So the net/url package should fully meet your needs.