As a temporary fix you could create a custom function for when you are using maps with an int32 key. This is less than ideal but would work temporarily - https://play.golang.org/p/IOa_p4gxDB
On Saturday, May 20, 2017 at 12:26:46 PM UTC-4, bup...@gmail.com wrote: > > I reported this as issue #20439. > <https://github.com/golang/go/issues/20439> Thanks. > > By the way, I'm still finding how to workaround. > > > > 2017년 5월 21일 일요일 오전 1시 11분 26초 UTC+9, Ian Lance Taylor 님의 말: > >> On Sat, May 20, 2017 at 7:55 AM, <bup...@gmail.com> wrote: >> > One additional question: may I report this as bug of golang? >> >> Yes. Thanks. >> >> Ian >> >> > 2017년 5월 20일 토요일 오후 11시 51분 56초 UTC+9, bup...@gmail.com 님의 말: >> >> >> >> Go Source: >> >> https://play.golang.org/p/dMKNy4pTnb >> >> >> >> Expected: >> >> >> >> [ ok] Element 0 is zero >> >> [ ok] Element 0 is zero >> >> [ ok] Element 0 is zero >> >> >> >> Actual: >> >> >> >> [ ok] Element 0 is zero >> >> [ ok] Element 0 is zero >> >> [err] template: :1:15: executing "" at <index . 0>: error calling >> index: >> >> value has type int; should be int32 >> >> >> >> >> >> I think "untyped" integer in template should become not only "int", >> but >> >> also "int32", "int64", ...... >> >> >> >> Is there possible workaround to index from map with key type is int32? >> >> >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "golang-nuts" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to golang-nuts...@googlegroups.com. >> > For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.