Skip to content

Commit 175c90b

Browse files
committed
api: unexport newAuthRequest
Not that it matters since everything is external, but it shouldn't be used from outside of api.go. It keeps my mental state cleaner while I re-learn this code.
1 parent 19e1560 commit 175c90b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func materializeFile(f *os.File) (io.Reader, int64, error) {
4949
}
5050

5151
/* create a new request that sends the auth token */
52-
func NewAuthRequest(method, url, bodyType, token string, headers map[string]string, body io.Reader) (*http.Request, error) {
52+
func newAuthRequest(method, url, bodyType, token string, headers map[string]string, body io.Reader) (*http.Request, error) {
5353
vprintln("creating request:", method, url, bodyType, token)
5454

5555
var n int64 // content length
@@ -85,7 +85,7 @@ func NewAuthRequest(method, url, bodyType, token string, headers map[string]stri
8585
}
8686

8787
func DoAuthRequest(method, url, bodyType, token string, headers map[string]string, body io.Reader) (*http.Response, error) {
88-
req, err := NewAuthRequest(method, url, bodyType, token, headers, body)
88+
req, err := newAuthRequest(method, url, bodyType, token, headers, body)
8989
if err != nil {
9090
return nil, err
9191
}

0 commit comments

Comments
 (0)