Skip to content

Commit

Permalink
test(telegram): simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Dec 24, 2020
1 parent ff9ea48 commit 37d60c7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions telegram/auth_flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ func ExampleAuthFlow_Run() {
}
}

appIDString := os.Getenv("APP_ID")
appHash := os.Getenv("APP_HASH")
phone := os.Getenv("PHONE")
pass := os.Getenv("PASSWORD")

var (
appIDString = os.Getenv("APP_ID")
appHash = os.Getenv("APP_HASH")
phone = os.Getenv("PHONE")
pass = os.Getenv("PASSWORD")
)
if appIDString == "" || appHash == "" || phone == "" || pass == "" {
log.Fatal("PHONE, PASSWORD, APP_ID or APP_HASH is not set: skip")
log.Fatal("PHONE, PASSWORD, APP_ID or APP_HASH is not set")
}

appID, err := strconv.Atoi(appIDString)
Expand Down

0 comments on commit 37d60c7

Please sign in to comment.