On Sat, Feb 29, 2020 at 10:11 AM Warren Stephens <wsteph...@prognoshealth.com> wrote: > > The labelled with statements would allow for a test to be written > specifically for each step of a function. > > Each test would begin at the with statement, providing the variables and > values required, and end at the next with statement or return statement. > > Each step of a function could be tested (or not) without having to refactor > the function into testable pieces > which would lose the natural structure of the original code.
I feel like there is something missing here. How do you write a test that uses a with statement? Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcW0ZSB8MxRa9pz-gGVcxg8HSP_AmyXx9djU-K65ir%3DDTg%40mail.gmail.com.