A part of string is lost in the SSA code

The generated SSA code of a long literal string is automatically trimmed. How can I get the generated code as it is without lost?

Given the code below,

a123 := "wwwwwwwwwwweeeeeeeeeeeeeeeeaaaaaaaaaa"

The generated SSA code is

*t119 = "wwwwwwwwwwweeeeee...":string

Thank you

Here’s the code where it is truncated. Maybe it provides some clues to access the full value. https://cs.opensource.google/go/x/tools/+/refs/tags/v0.1.11:go/ssa/const.go;l=79

1 Like

Hi @mje. Thanks for the useful link! Now I understood why it was truncated. However, there seems no way to get the code not truncated without interacting with the SSA package. My purpose was to get code as it is without interacting with the SSA package. Thanks a lot.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.