fix: cover all nilable writer kinds
This commit is contained in:
@@ -44,7 +44,7 @@ func WithQRWriter(writer io.Writer) Option {
|
|||||||
if !isNil {
|
if !isNil {
|
||||||
value := reflect.ValueOf(writer)
|
value := reflect.ValueOf(writer)
|
||||||
switch value.Kind() {
|
switch value.Kind() {
|
||||||
case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
|
case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer:
|
||||||
isNil = value.IsNil()
|
isNil = value.IsNil()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user