Created
September 5, 2016 03:45
-
-
Save aarti/ee295f325bac496ad10595d2724b707a to your computer and use it in GitHub Desktop.
go generic print cannot print array
This file contains 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
gore> a:=[]int{1,2,3} | |
[]int{1, 2, 3} | |
gore> println(a) | |
[3/3]0xc420041f20 | |
gore> b:=[3]int{1,2,3} | |
[3/3]0xc420041ef8 | |
[3]int{1, 2, 3} | |
gore> println(b) | |
# command-line-arguments | |
/var/folders/r0/xqky0mq5773d6bc44pk_xfb00000gp/T/705406632/gore_session.go:10: illegal types for operand: print | |
[3]int | |
error: exit status 2 | |
exit status 2 | |
gore> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment