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

Commit 23ff932

Browse files
authored
Allow unauthenticated client (#40)
1 parent df50c0d commit 23ff932

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
@@ -31,7 +31,7 @@ func New(auth, baseURL string) (*Client, error) {
3131
if strings.Contains(auth, ":") {
3232
split := strings.SplitN(auth, ":", 2)
3333
u.User = url.UserPassword(split[0], split[1])
34-
} else {
34+
} else if auth != "" {
3535
key = fmt.Sprintf("Bearer %s", auth)
3636
}
3737
return &Client{

0 commit comments

Comments
 (0)