If you use a type like `map[string]any` then yes, it's going to be the same as Context. However, you can make a struct with fields of exactly the types you want.
It won't propagate to the third-party libraries, yes. But then again, why don't they just provide an explicit way of passing values instead of hiding them in the context?
> why don't they just provide an explicit way of passing values instead of hiding them in the context?
Hiding them in a context is the explicit way of passing values through oblivious third-party libraries.
In some future version of Go, it would be nice to just have dynamic scoping. But this works now, and it’s a good pattern. The only real issue is the function-colouring one, and that’s solvable by simply requiring that every exported function take a context.
Precisely because you need to be able to pass it through third party libraries and into callbacks on the other side where you need to recover the values.
Yeah most people talking here are unlikely to have worked on large scale Go apps.
Managing a god-level context struct with all the fields that ever could be relevant and explaining what they mean in position independent ways for documentation is just not scalable at all.
Import cycles mean you’re forced into this if you want to share between all your packages, and it gets really hairy.
> That's true if you need to clean up temporary files every night or make a backup.
Making a backup is usually reserved for the quietest hours of the morning, so that it does not compete as much for resources with the normal operation of the system; in my experience, the quietest hour is usually around 4:00 local time.
Well assuming that the gates don't move timezones. But obviously jobs that need to run for a given timezone should be configured to run in that timezone.
no, it would run either twice at the "same time" as it is read out, but obviously 60 minutes apart time duration wise; but this can't be helped as this time "existed" twice in that time zone. Or conversely in spring that time wouldn't happen at all, but the cron job will still run 60 minutes apart time duration wise. But this is the downside of local time, just make sure if you want to open a door at 01:30 local time that that is what you really want, because the unintended consequences could be a bit strange.
This site's cookies seem to be issued for some 2 months. You can extend cookies' lifetime in Firefox globally and per-site but a cookie can (and in most cases should) be invalidated on the server side.
For sure there are gains to be made by having proper material as opposed to entry level, but those quickly become marginal.
The biggest gains by far are usually found in working on your driving style. Have a look at telemetry of someone who's slightly faster and work out the differences methodologically.
Shameless self-promotion: if you're racing in iRacing, have a look at https://garage61.net, we have over 125 million laps of telemetry to learn from.