Skip to content

Commit

Permalink
fix(go): retro-compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed May 1, 2024
1 parent 1f03dbc commit 0b743d5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"net/http"
"slices"
"sync"
"time"
)
Expand Down Expand Up @@ -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")
}

Expand Down

0 comments on commit 0b743d5

Please sign in to comment.