Created
October 21, 2022 15:13
-
-
Save Mr-Malomz/50fb3024e0a84db97754d57b42e12845 to your computer and use it in GitHub Desktop.
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
package api | |
import ( | |
"log" | |
"os" | |
"github.com/joho/godotenv" | |
) | |
func envACCOUNTSID() string { | |
println(godotenv.Unmarshal(".env")) | |
err := godotenv.Load(".env") | |
if err != nil { | |
log.Fatalln(err) | |
log.Fatal("Error loading .env file") | |
} | |
return os.Getenv("TWILIO_ACCOUNT_SID") | |
} | |
func envAUTHTOKEN() string { | |
err := godotenv.Load() | |
if err != nil { | |
log.Fatal("Error loading .env file") | |
} | |
return os.Getenv("TWILIO_AUTHTOKEN") | |
} | |
func envSERVICESID() string { | |
err := godotenv.Load() | |
if err != nil { | |
log.Fatal("Error loading .env file") | |
} | |
return os.Getenv("TWILIO_SERVICES_ID") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment