mirror of
https://github.com/juanfont/headscale.git
synced 2025-09-25 17:51:11 +02:00
Refactor to use reflect.TypeFor
This commit is contained in:
parent
d29feaef79
commit
eb6d80ec18
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// Got from https://github.com/xdg-go/strum/blob/main/types.go
|
||||
var textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem()
|
||||
var textUnmarshalerType = reflect.TypeFor[encoding.TextUnmarshaler]()
|
||||
|
||||
func isTextUnmarshaler(rv reflect.Value) bool {
|
||||
return rv.Type().Implements(textUnmarshalerType)
|
||||
|
Loading…
Reference in New Issue
Block a user