Skip to content

Commit

Permalink
update else if to switch
Browse files Browse the repository at this point in the history
  • Loading branch information
blight19 committed Mar 6, 2024
1 parent c221283 commit d80c68b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/redis-shake/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func main() {
}
// create writer
var theWriter writer.Writer
if v.IsSet("redis_writer") {
switch {
case v.IsSet("redis_writer"):
opts := new(writer.RedisWriterOptions)
defaults.SetDefaults(opts)
err := v.UnmarshalKey("redis_writer", opts)
Expand All @@ -109,10 +110,9 @@ func main() {
entry.Argv = []string{"FLUSHALL"}
theWriter.Write(entry)
}
} else {
default:
log.Panicf("no writer config entry found")
}

// create status
status.Init(theReader, theWriter)

Expand Down

0 comments on commit d80c68b

Please sign in to comment.