mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01: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