Yes[1]: your logger is a concrete dependency which should be passed explicitly to the function which logs!
And as the common idiom is to not include Context in struct but pass as the first argument, the logger should be inserted into that Context. [1] https://peter.bourgon.org/go-best-practices-2016/#logging-and-instrumentation -- 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. For more options, visit https://groups.google.com/d/optout.