From 49f16fcad1ce00f7552524c6d36f6306e95c8f17 Mon Sep 17 00:00:00 2001 From: Kim Gustyr Date: Tue, 12 Mar 2024 16:49:06 +0000 Subject: [PATCH] feat: Handle nil options (#120) --- client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index a8bf183..b377aee 100644 --- a/client.go +++ b/client.go @@ -50,7 +50,9 @@ func NewClient(apiKey string, options ...Option) *Client { c.log = createLogger() for _, opt := range options { - opt(c) + if opt != nil { + opt(c) + } } c.client.SetLogger(c.log)