Artem Chernyshev 032851844f fix: get rid of data race in encoder and fix concurrent map access
Fixes: https://github.com/talos-systems/talos/issues/3377, https://github.com/talos-systems/talos/issues/3380

Fixed the data race in the encoder documentation examples by using `sync.Once`.
We only need to generate them once anyways and then it's not a big deal
that we are using the same pointers everywhere as they're pretty much
constant.

As of `system.go`, looks like we actually have concurrent operations for
partitions unmount so I just added a mutex there.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-29 01:00:46 -07:00
..
2021-03-05 05:58:33 -08:00
2020-04-28 08:20:55 -07:00
2020-06-30 10:39:56 -07:00
2021-03-05 05:58:33 -08:00
2021-02-02 10:18:26 -08:00