From 17622ecba150d430e63080f2b121ce2565f6a030 Mon Sep 17 00:00:00 2001 From: Jimmi Dyson Date: Wed, 25 Nov 2015 16:41:18 +0000 Subject: [PATCH] Rename readInt64 -> readUInt64 for clarity --- container/raw/handler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/container/raw/handler.go b/container/raw/handler.go index 9dab873c..6b85be3a 100644 --- a/container/raw/handler.go +++ b/container/raw/handler.go @@ -138,7 +138,7 @@ func readString(dirpath string, file string) string { return strings.TrimSpace(string(out)) } -func readInt64(dirpath string, file string) uint64 { +func readUInt64(dirpath string, file string) uint64 { out := readString(dirpath, file) if out == "" { return 0 @@ -199,7 +199,7 @@ func (self *rawContainerHandler) GetSpec() (info.ContainerSpec, error) { if ok { if utils.FileExists(cpuRoot) { spec.HasCpu = true - spec.Cpu.Limit = readInt64(cpuRoot, "cpu.shares") + spec.Cpu.Limit = readUInt64(cpuRoot, "cpu.shares") } } @@ -238,8 +238,8 @@ func (self *rawContainerHandler) GetSpec() (info.ContainerSpec, error) { if ok { if utils.FileExists(memoryRoot) { spec.HasMemory = true - spec.Memory.Limit = readInt64(memoryRoot, "memory.limit_in_bytes") - spec.Memory.SwapLimit = readInt64(memoryRoot, "memory.memsw.limit_in_bytes") + spec.Memory.Limit = readUInt64(memoryRoot, "memory.limit_in_bytes") + spec.Memory.SwapLimit = readUInt64(memoryRoot, "memory.memsw.limit_in_bytes") } } }