compat/info.go: TrimPrefix(CGroupsVersion, "v")

For compatibility with Docker: 846b7e24ba/api/swagger.yaml (L4528-L4534)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2020-07-28 18:17:13 +09:00
parent 2b7bc9b101
commit f657e5551e

View File

@ -119,7 +119,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
BuildahVersion: infoData.Host.BuildahVersion, BuildahVersion: infoData.Host.BuildahVersion,
CPURealtimePeriod: sysInfo.CPURealtimePeriod, CPURealtimePeriod: sysInfo.CPURealtimePeriod,
CPURealtimeRuntime: sysInfo.CPURealtimeRuntime, CPURealtimeRuntime: sysInfo.CPURealtimeRuntime,
CgroupVersion: infoData.Host.CGroupsVersion, CgroupVersion: strings.TrimPrefix(infoData.Host.CGroupsVersion, "v"),
Rootless: rootless.IsRootless(), Rootless: rootless.IsRootless(),
SwapFree: infoData.Host.SwapFree, SwapFree: infoData.Host.SwapFree,
SwapTotal: infoData.Host.SwapTotal, SwapTotal: infoData.Host.SwapTotal,