Download casting - How to cast to a type alias in Go? - Stack Overflow book pdf free download link or read online here in PDF. Read online casting - How to cast to a type alias in Go? - Stack Overflow book pdf free download link book now. All books are in clear copy here, and all files are secure so don't worry about it. This site is like a library, you could find million book here by using search box in the header.
We need to do this (play): var a interface{} = int(10) var b MyInt = a.(MyInt) Now we have the same problem as in your question. This assertion fails with this panic: panic: interface conversion: interface is int, not main.MyInt. The reason for this is stated in the type assertions section of the spec:
Read : casting - How to cast to a type alias in Go? - Stack Overflow pdf book online Select one of servers for direct link: |
---|