mirror of
https://github.com/golang/go
synced 2024-11-06 00:26:11 -07:00
9 lines
142 B
Go
9 lines
142 B
Go
|
package q1
|
||
|
|
||
|
func Deref(typ interface{}) interface{} {
|
||
|
if typ, ok := typ.(*int); ok {
|
||
|
return *typ
|
||
|
}
|
||
|
return typ
|
||
|
}
|