Hi While writing unit test, what should be the preferred way to mock an external(database, http...) call, *function based approach* or *interface based approach?*
I don't understand when to use function way and when to use interface way. Which one is more idiomatic Golang way if I am writing my web server from scratch? -- 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/CAORUUQWr76ub8_cZR%3DTC1ukyDO2NEgciBvmd8PN0ETHKgtvCEg%40mail.gmail.com.