Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthpun committed Apr 26, 2024
1 parent df29152 commit e56a70a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions access/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
)

// ClientOption is a configuration option for the client.
type ClientOption func (*options)
type ClientOption func(*options)

type options struct {
jsonOptions []cdcjson.Option
Expand All @@ -50,19 +50,19 @@ func DefaultClientOptions() *options {
}

// WithJSONOptions wraps a json.Option into a ClientOption.
func WithJSONOptions(jsonOpts ...cdcjson.Option) ClientOption {
return func (opts *options) {
func WithJSONOptions(jsonOpts ...cdcjson.Option) ClientOption {
return func(opts *options) {
opts.jsonOptions = append(opts.jsonOptions, jsonOpts...)
}
}

// NewClient creates an HTTP client exposing all the common access APIs.
// Client will use provided host for connection.
func NewClient(host string, opts ...ClientOption) (*Client, error) {
cfg := DefaultClientOptions()
for _, apply := range opts {
apply(cfg)
}
cfg := DefaultClientOptions()
for _, apply := range opts {
apply(cfg)
}

client, err := NewBaseClient(host)
if err != nil {
Expand Down

0 comments on commit e56a70a

Please sign in to comment.