Go

Go

Made by DeepSource

Unimplemented Redis method call would panic GO-E1002

Bug risk
Critical
Autofix

Following unimplemented functions panic when called, as they have nothing in their function body except the call to panic.

func (c cmdable) Sync(_ context.Context) {
    panic("not implemented")
}

func (c cmdable) Quit(_ context.Context) *StatusCmd {
    panic("not implemented")
}

Bad practice

ctx := context.TODO()
client := redis.NewClient(&redis.Options{})

client.Sync(ctx)
client.Quit(ctx)

...

Recommended

ctx := context.TODO()
client := redis.NewClient(&redis.Options{})

...

References