We get undefined behavior, at least in code that re-slices, unless capacity is set. This ensures the buffer under the string has a capacity set to the same length as its size. This also shows more explicitly the problems in TinyGo (ex some type mismatch you have to ignore until fixed). Signed-off-by: Adrian Cole <adrian@tetrate.io>
65 KiB
Executable File
65 KiB
Executable File