This repository was archived by the owner on Oct 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Expand file tree Collapse file tree 3 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,7 @@ module github.com/passageidentity/example-go
2
2
3
3
go 1.15
4
4
5
- require github.com/passageidentity/passage-go v1.1.1
5
+ require (
6
+ github.com/joho/godotenv v1.4.0 // indirect
7
+ github.com/passageidentity/passage-go v1.1.1
8
+ )
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8
2
2
github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
3
3
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY =
4
4
github.com/golang-jwt/jwt v3.2.2+incompatible /go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I =
5
+ github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg =
6
+ github.com/joho/godotenv v1.4.0 /go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4 =
5
7
github.com/passageidentity/passage-go v1.1.1 h1:nfc29QFPOhFrdcKr9pU5K4pVhsI+aWxtSxLSWjX4GPE =
6
8
github.com/passageidentity/passage-go v1.1.1 /go.mod h1:UvFvzPuSKx16jwWXti/JIaW9+3MfJw2fE+PbMV43I5I =
7
9
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM =
Original file line number Diff line number Diff line change @@ -7,10 +7,16 @@ import (
7
7
"os"
8
8
"text/template"
9
9
10
+ "github.com/joho/godotenv"
10
11
"github.com/passageidentity/passage-go"
11
12
)
12
13
13
14
func main () {
15
+ err := godotenv .Load (".env" )
16
+ if err != nil {
17
+ log .Fatal ("Failed to read .env variables" )
18
+ }
19
+
14
20
port := os .Getenv ("PORT" )
15
21
if port == "" {
16
22
log .Fatal ("PORT environment variable required" )
You can’t perform that action at this time.
0 commit comments