Created
July 20, 2020 09:21
-
-
Save buildingwatsize/d74671b517e09c43abec83b43a1b92a1 to your computer and use it in GitHub Desktop.
repository.go - Goldnoti [Phase 2]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
// Bot : For LINE Bot Client Configuration | |
Bot *linebot.Client | |
channelSecret string | |
channelToken string | |
) | |
// SetupLINEConfig : Setup Channel Secret and Channel Token for using in LINE Bot | |
func SetupLINEConfig() { | |
channelSecret = os.Getenv("CHANNEL_SECRET") | |
channelToken = os.Getenv("CHANNEL_TOKEN") | |
} | |
// LINEBotInitialize : First Initialize LINE Bot Integration | |
func LINEBotInitialize() { | |
var err error | |
Bot, err = linebot.New( | |
channelSecret, | |
channelToken, | |
) | |
if err != nil { | |
log.Panicln("LINE Bot Initialize Error:", err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment