It would be nice to be able to use %q in conf.String() to get clearer output for strings and slices, but when used indiscriminately against the example, the results are less than ideal for certain types:
SUB_VALUE='\x01' TIME_TO_WAIT="5s" DNS_SERVER="1.1.1.1" DEBUG=%!q(bool=false) DB_SERVERS=["127.0.0.1" "127.0.0.2"]
DB_SERVERS and the other string values look good, but integers like SUB_VALUE are not great, and booleans like DEBUG simply don't render with %q at all. This could require a new function that attempts to crawl the structure looking for a string at some level, or a generification and code sharing of the type identification code in usage.go
It would be nice to be able to use
%qinconf.String()to get clearer output for strings and slices, but when used indiscriminately against the example, the results are less than ideal for certain types:DB_SERVERS and the other string values look good, but integers like SUB_VALUE are not great, and booleans like DEBUG simply don't render with
%qat all. This could require a new function that attempts to crawl the structure looking for a string at some level, or a generification and code sharing of the type identification code inusage.go