Thank you very much for the answer! - It actually turns out that my structure is a bit more complex than i though. The test-cases themself are a structure of seven strings and one in64 which are organized as a test-case list into a map[string] and those lists are organized into groups also as maps[strings]… 🤯
I am generating the variable that holds all this data straight out of two Database-tables, it looks like this
var TestCaseGroup = T_TestCaseGroup {
"cn=config": {
"ds-cfg-add-missing-rdn-attributes": {
RecommendedValue: "true",
MessageClass: "Recommendation",
MessageType: "Compatibility",
MessageText: "It is recommended to enable this feature to make OUD more compatible to older applications."},
"ds-cfg-allow-attribute-name-exceptions": {
RecommendedValue: "false",
MessageClass: "Severe Warning",
MessageType: "Data-Quality",
MessageText: "This feature should be disabled, to prevent the directory-schema to become incompatible with LDAP standards."},
…
And i have no idea how to figure out if these strings are being copied into the heap.
But: The good news is, that the compiler is performing a string de-duplication, for example the string "Mild Error" appears in hundred of test-cases but appears only once in the whole program-code. - Tested with strings | grep 'Mild Error'. I think that's a good sign.