mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
3bc50c45ba84c4d177a2a58afec8538268ce08fd
The formatter.ContainerStats struct exposes its Mutex. This is a bad design and should be fixed. To fix that, I separated the statistics attributes from ContainerStats to StatsEntry and hid the mutex. Notice that the mutex protects both the `err` field and the statistics attributes. Then, implemented SetStatistics, SetError, GetStatistics and GetError to avoid races. Moreover, to make this less granular, I decided to replace the read-write mutex with the regular mutex and to pass a StatsEntry slice to formatter.ContainerStatsWrite Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Description
Интерфейс командной строки Docker
Languages
Go
92%
Shell
5.5%
Dockerfile
1.1%
Go-Checksums
0.9%
Makefile
0.3%
Other
0.2%