mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-24 13:46:53 +02:00
Refactor to use reflect.TypeFor
This commit is contained in:
parent
d29feaef79
commit
a2a6d20218
@ -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