@@ -40,14 +40,14 @@ func (f funcOpt) Apply(c *Client) error {
4040 return f (c )
4141}
4242
43- // NewClientOption creates a new ClientOption from a function
44- func NewClientOption (f func (* Client ) error ) ClientOption {
43+ // newClientOption creates a new ClientOption from a function
44+ func newClientOption (f func (* Client ) error ) ClientOption {
4545 return funcOpt (f )
4646}
4747
4848// WithDockerHost returns a client option that sets the docker host for the client.
4949func WithDockerHost (dockerHost string ) ClientOption {
50- return NewClientOption (func (c * Client ) error {
50+ return newClientOption (func (c * Client ) error {
5151 c .dockerHost = dockerHost
5252 return nil
5353 })
@@ -57,15 +57,15 @@ func WithDockerHost(dockerHost string) ClientOption {
5757// If set, the client will use the docker context to determine the docker host.
5858// If used in combination with [WithDockerHost], the host in the context will take precedence.
5959func WithDockerContext (dockerContext string ) ClientOption {
60- return NewClientOption (func (c * Client ) error {
60+ return newClientOption (func (c * Client ) error {
6161 c .dockerContext = dockerContext
6262 return nil
6363 })
6464}
6565
6666// WithExtraHeaders returns a client option that sets the extra headers for the client.
6767func WithExtraHeaders (headers map [string ]string ) ClientOption {
68- return NewClientOption (func (c * Client ) error {
68+ return newClientOption (func (c * Client ) error {
6969 c .extraHeaders = headers
7070 return nil
7171 })
@@ -75,7 +75,7 @@ func WithExtraHeaders(headers map[string]string) ClientOption {
7575// If not set, the default health check will be used, which retries the ping to the
7676// docker daemon until it is ready, three times, or the context is done.
7777func WithHealthCheck (healthCheck func (ctx context.Context ) func (c * Client ) error ) ClientOption {
78- return NewClientOption (func (c * Client ) error {
78+ return newClientOption (func (c * Client ) error {
7979 if healthCheck == nil {
8080 return errors .New ("health check is nil" )
8181 }
@@ -87,7 +87,7 @@ func WithHealthCheck(healthCheck func(ctx context.Context) func(c *Client) error
8787
8888// WithLogger returns a client option that sets the logger for the client.
8989func WithLogger (log * slog.Logger ) ClientOption {
90- return NewClientOption (func (c * Client ) error {
90+ return newClientOption (func (c * Client ) error {
9191 c .log = log
9292 return nil
9393 })
0 commit comments