66dfc0169f
The User-Agent includes the kernel version, which involves making a syscall (and parsing the results) on Linux, and reading (plus parsing) the registry on Windows. These operations are relatively costly, and we should not perform those on every request that uses the User-Agent. This patch adds a sync.Once so that we only perform these actions once for the lifetime of the daemon's process. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
useragent.go | ||
version_lib.go |