From 0b743d5c1ea47cf5401e4957e07be2ec085d1776 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Wed, 1 May 2024 19:48:52 +0200 Subject: [PATCH] fix(go): retro-compatibility --- client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client.go b/client.go index 1a1ec4b..6dd7817 100644 --- a/client.go +++ b/client.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "net/http" - "slices" "sync" "time" ) @@ -37,7 +36,7 @@ func New(cfg Config) *Client { if cfg.BatchBytes <= 0 { panic("wrong BatchWait option") } - if !slices.Contains([]CommitMode{Auto, WaitFor, Force}, cfg.Commit) { + if cfg.Commit != Auto && cfg.Commit != WaitFor && cfg.Commit != Force { panic("wrong Commit option") }