yeah, if you won't use any features of context, atleast it makes code more readable
of course
argument: you usually can just pass context.Context around, for example - you get one from *”net/http”.Request so how exactly will you cancel something that takes quit chan struct{} when an http request was canceled? This will force you to write a lot of unnecessary boilerplate. context.Context is just a not-so-well-designed standard for cancelation that we as a community agreed upon for Go 1
Обсуждают сегодня