We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3b09d7 commit 2b9600cCopy full SHA for 2b9600c
context.go
@@ -168,10 +168,12 @@ func GetCurrentContainerID() string {
168
scanner := bufio.NewScanner(reader)
169
scanner.Split(bufio.ScanLines)
170
171
+ regex := "/docker/([[:alnum:]]{64})$"
172
+ re := regexp.MustCompilePOSIX(regex)
173
+
174
for scanner.Scan() {
175
_, lines, err := bufio.ScanLines([]byte(scanner.Text()), true)
176
if err == nil {
- re := regexp.MustCompilePOSIX("/docker/([[:alnum:]]{64})$")
177
if re.MatchString(string(lines)) {
178
submatches := re.FindStringSubmatch(string(lines))
179
containerID := submatches[1]
0 commit comments