tlog.app/go/tlog@v0.23.1/tlio/unwrap.go (about) 1 package tlio 2 3 type ( 4 Unwrapper interface { 5 Unwrap() interface{} 6 } 7 ) 8 9 func Unwrap(x interface{}) interface{} { 10 w, ok := x.(Unwrapper) 11 if !ok { 12 return nil 13 } 14 15 return w.Unwrap() 16 }