Commit Graph

2 Commits

Author SHA1 Message Date
Brad Fitzpatrick d4ff75359c pkg/client: reduce the number of New constructors, return error by default
This removes NewDefault and NewFromParams.

Now the default way to create a client is:

    client.New() -> (*Client, error)

Specifying a server is optional and now requires
client.OptionServer(server).

If the caller really wants to log.Fatal on error, they can use
client.NewOrFail.

Also, some of the boilerplate from GopherJS callers is now promoted to
be the default behavior in the client package.

Change-Id: Icb106cf3e13cc492fe5b2f7f240e1ad4227eaf33
2018-01-24 07:42:04 -08:00
Brad Fitzpatrick fc49db3967 cmd/camtool: add "camtool whoami" subcommand
Actually add the file, missing from previous commit
38c2a87ad2.

That's what I get for skipping code review. Sigh.

Change-Id: Icfaa7f6922c4ceaae69bd228b8d6498d0a85a7d8
2018-01-23 15:42:36 -08:00