Skip to content

Commit

Permalink
Simplify regex
Browse files Browse the repository at this point in the history
  • Loading branch information
databus23 committed Jun 4, 2019
1 parent d16f999 commit 9d24ac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.11
FROM golang:1.11 AS builder

WORKDIR /go/src/github.com/sapcc/kuberntes-oomkill-exporter
ENV GO111MODULE=on \
Expand All @@ -16,7 +16,7 @@ FROM alpine:3.8
LABEL maintainer="[email protected]"

RUN apk --no-cache add ca-certificates
COPY --from=0 /kubernetes-oomkill-exporter /kubernetes-oomkill-exporter
COPY --from=builder /kubernetes-oomkill-exporter /kubernetes-oomkill-exporter

ENTRYPOINT ["/kubernetes-oomkill-exporter"]
CMD ["-logtostderr"]
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
)

var (
kmesgRE = regexp.MustCompile("/pod(\\w+\\-\\w+\\-\\w+\\-\\w+\\-\\w+)/([a-f0-9]+) killed as a result of limit of /kubepods")
kmesgRE = regexp.MustCompile(`/pod(\w+-\w+-\w+-\w+-\w+)/([a-f0-9]+) killed as a result of limit of /kubepods`)
)

var (
Expand Down

0 comments on commit 9d24ac8

Please sign in to comment.