Skip to content

Commit

Permalink
Updating Dockerfile since there's no go.sum
Browse files Browse the repository at this point in the history
  • Loading branch information
chelming committed Nov 5, 2024
1 parent 70b404e commit b997e8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:alpine AS builder
RUN apk update && apk add --no-cache ca-certificates && update-ca-certificates
WORKDIR /app
COPY go.mod go.sum ./
COPY go.mod ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o owa-away .
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module chelming/owa-away
module github.com/chelming/owa-away

go 1.18
go 1.23.2
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ func processCalendar(bodyString string) string {
bodyString = strings.Replace(bodyString, "\r\n", "%%", -1) // join to make regex easier
matches := re.FindAllStringSubmatch(bodyString, -1)
for _, match := range matches {
fullMatch := match[0]
for _, keyword := range keywords {
if strings.Contains(match, keyword) {
bodyString = strings.Replace(bodyString, match, "", -1)
if strings.Contains(fullMatch, keyword) {
bodyString = strings.Replace(bodyString, fullMatch, "", -1)
break
}
}
Expand Down

0 comments on commit b997e8e

Please sign in to comment.