Skip to content

change Client initialization

Luke Champine requested to merge client into master

Also expose UserAgent. Now to create a Client with a password, do:

c := client.New(":9980")
c.Password = "foo"

or:

c := &client.Client{
    Address: ":9980",
    Password: "foo",
}

Since all the fields are exposed, the client.New function feels a bit superfluous now, but I kept it around because we may add additional unexported fields in the future, and because client.New(":9980") is nicer than &client.Client{Address: ":9980"}

Merge request reports