Last active
January 10, 2019 14:12
-
-
Save ashkrit/2d7eb4e97c2f0183235e3f820204fe83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Create Alias for int type | |
| type RichInt int | |
| func main() { | |
| var ri RichInt | |
| ri = 100 | |
| fmt.Println("Value of rich int", ri) | |
| fmt.Println("Convert to Int", int(ri)) | |
| fmt.Println("From int to Rich Int", RichInt(100)) | |
| fmt.Println("Binary Value", ri.toBinary()) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment