From 4d190af804f200fd8def0ebbcc011704374d6494 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 1 Nov 2019 16:18:06 +0100 Subject: [PATCH] Rename "v1" to "statsV1" follow-up to 27552ceb15bca544820229e574427d4c1d6ef585, where this was left as a review comment, but the PR was already merged. Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 9a7e96b5b7e97e034ce7bb0f1e7788d1bd881c7f) Signed-off-by: Sebastiaan van Stijn --- daemon/daemon_unix.go | 4 ++-- libcontainerd/types/types_linux.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/daemon_unix.go b/daemon/daemon_unix.go index 431f108346..3cdceea27a 100644 --- a/daemon/daemon_unix.go +++ b/daemon/daemon_unix.go @@ -16,7 +16,7 @@ import ( "strings" "time" - v1 "github.com/containerd/cgroups/stats/v1" + statsV1 "github.com/containerd/cgroups/stats/v1" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/blkiodev" pblkiodev "github.com/docker/docker/api/types/blkiodev" @@ -1347,7 +1347,7 @@ func (daemon *Daemon) conditionalUnmountOnCleanup(container *container.Container return daemon.Unmount(container) } -func copyBlkioEntry(entries []*v1.BlkIOEntry) []types.BlkioStatEntry { +func copyBlkioEntry(entries []*statsV1.BlkIOEntry) []types.BlkioStatEntry { out := make([]types.BlkioStatEntry, len(entries)) for i, re := range entries { out[i] = types.BlkioStatEntry{ diff --git a/libcontainerd/types/types_linux.go b/libcontainerd/types/types_linux.go index 8cc41052b3..9b6feb4bf0 100644 --- a/libcontainerd/types/types_linux.go +++ b/libcontainerd/types/types_linux.go @@ -3,7 +3,7 @@ package types // import "github.com/docker/docker/libcontainerd/types" import ( "time" - v1 "github.com/containerd/cgroups/stats/v1" + statsV1 "github.com/containerd/cgroups/stats/v1" specs "github.com/opencontainers/runtime-spec/specs-go" ) @@ -13,13 +13,13 @@ type Summary struct{} // Stats holds metrics properties as returned by containerd type Stats struct { Read time.Time - Metrics *v1.Metrics + Metrics *statsV1.Metrics } // InterfaceToStats returns a stats object from the platform-specific interface. func InterfaceToStats(read time.Time, v interface{}) *Stats { return &Stats{ - Metrics: v.(*v1.Metrics), + Metrics: v.(*statsV1.Metrics), Read: read, } }