Skip to content

Commit 2916d8b

Browse files
committed
main: use lambdautils.InLambda()
1 parent 3d0f051 commit 2916d8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/alertmanager/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ import (
55
"fmt"
66
"github.com/function61/eventhorizon/pkg/ehcli"
77
"github.com/function61/eventhorizon/pkg/ehreader"
8+
"github.com/function61/gokit/aws/lambdautils"
89
"github.com/function61/gokit/dynversion"
910
"github.com/function61/gokit/logex"
1011
"github.com/function61/gokit/ossignal"
1112
"github.com/function61/lambda-alertmanager/pkg/amstate"
1213
"github.com/spf13/cobra"
1314
"os"
14-
"strings"
1515
"time"
1616
)
1717

1818
func main() {
1919
// AWS Lambda doesn't support giving argv, so we use an ugly hack to detect when
2020
// we're in Lambda
21-
if strings.Contains(os.Args[0], "_lambda") {
21+
if lambdautils.InLambda() {
2222
lambdaHandler()
2323
return
2424
}

0 commit comments

Comments
 (0)