mirror of
https://github.com/containrrr/watchtower.git
synced 2026-03-10 22:52:35 +01:00
fix lint suggestions
This commit is contained in:
parent
cc40a3c3a7
commit
8408b6b46f
3 changed files with 7 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// container package contains code related to dealing with docker containers
|
||||
package container
|
||||
|
||||
import (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue