Gopherjs: reflect Type.Size() bug

Created on 20 Oct 2017  Â·  4Comments  Â·  Source: gopherjs/gopherjs

Most helpful comment

Here's a simpler case:

https://gopherjs.github.io/playground/#/hOibckA1tX

It looks like size of structs isn't supported.

All 4 comments

Thanks for reporting. That looks like a legitimate issue.

Here's a simpler case:

https://gopherjs.github.io/playground/#/hOibckA1tX

It looks like size of structs isn't supported.

Given the Javascript substrate, this seems like it would be hard to support in a useful, meaningful manner.

@j7b What do you want to do with this information — the size of a struct?

@theclapp I discovered my example porting go-gl code to gopherjs/webgl (specifically strided vertexattributepointer) and all the functionality to make Size() work for structs appears to exist in reflect, I think the iterator before SetKindType for Struct: just needs to sum the size of the fields.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benechols-wf picture benechols-wf  Â·  6Comments

flimzy picture flimzy  Â·  4Comments

canning-duck picture canning-duck  Â·  3Comments

myitcv picture myitcv  Â·  6Comments

linkerlin picture linkerlin  Â·  3Comments