This PR adds a second option for golden values. The golden package allows storing of expected values in files. The approach in this PR would allow storing the golden value in a package-level variable.
Initially I think support for this should be limited to only package-level variables of type string, but I think it would be possible to expand the support in the future.
I updated the internal uses of golden to use this new way of storing values, and the test cases show another couple examples.
This PR adds a second option for golden values. The
golden
package allows storing of expected values in files. The approach in this PR would allow storing the golden value in a package-level variable.Initially I think support for this should be limited to only package-level variables of type string, but I think it would be possible to expand the support in the future.
I updated the internal uses of
golden
to use this new way of storing values, and the test cases show another couple examples.