fix lint suggestions

This commit is contained in:
nils måsén 2022-09-17 12:34:02 +02:00
parent cc40a3c3a7
commit 8408b6b46f
3 changed files with 7 additions and 4 deletions

View file

@ -10,6 +10,7 @@ import (
var dockerContainerPattern = regexp.MustCompile(`[0-9]+:.*:/docker/([a-f|0-9]{64})`)
// GetRunningContainerID tries to resolve the current container ID from the current process cgroup information
func GetRunningContainerID() (cid types.ContainerID, err error) {
file, err := os.ReadFile(fmt.Sprintf("/proc/%d/cgroup", os.Getpid()))
if err != nil {

View file

@ -1,3 +1,4 @@
// container package contains code related to dealing with docker containers
package container
import (