Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit cd94108

Browse files
Support authentication with passwords that contain a colon (#41)
Co-authored-by: Pascal Hofmann <[email protected]>
1 parent 5cf70a2 commit cd94108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func New(auth, baseURL string) (*Client, error) {
2929
}
3030
key := ""
3131
if strings.Contains(auth, ":") {
32-
split := strings.Split(auth, ":")
32+
split := strings.SplitN(auth, ":", 2)
3333
u.User = url.UserPassword(split[0], split[1])
3434
} else {
3535
key = fmt.Sprintf("Bearer %s", auth)

0 commit comments

Comments
 (0)