We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d0f051 commit 2916d8bCopy full SHA for 2916d8b
cmd/alertmanager/main.go
@@ -5,20 +5,20 @@ import (
5
"fmt"
6
"github.com/function61/eventhorizon/pkg/ehcli"
7
"github.com/function61/eventhorizon/pkg/ehreader"
8
+ "github.com/function61/gokit/aws/lambdautils"
9
"github.com/function61/gokit/dynversion"
10
"github.com/function61/gokit/logex"
11
"github.com/function61/gokit/ossignal"
12
"github.com/function61/lambda-alertmanager/pkg/amstate"
13
"github.com/spf13/cobra"
14
"os"
- "strings"
15
"time"
16
)
17
18
func main() {
19
// AWS Lambda doesn't support giving argv, so we use an ugly hack to detect when
20
// we're in Lambda
21
- if strings.Contains(os.Args[0], "_lambda") {
+ if lambdautils.InLambda() {
22
lambdaHandler()
23
return
24
}
0 commit comments