NewOrFail is like New, but calls log.Fatal instead of returning an error.
(opts ...ClientOption)
| 217 | |
| 218 | // NewOrFail is like New, but calls log.Fatal instead of returning an error. |
| 219 | func NewOrFail(opts ...ClientOption) *Client { |
| 220 | c, err := New(opts...) |
| 221 | if err != nil { |
| 222 | log.Fatalf("error creating client: %v", err) |
| 223 | } |
| 224 | return c |
| 225 | } |
| 226 | |
| 227 | // NewPathClient returns a new client accessing a subpath of c. |
| 228 | func (c *Client) NewPathClient(path string) (*Client, error) { |