Created
March 6, 2020 11:47
-
-
Save ayoisaiah/8b98d306141e5426dd13ca09e5c8bf84 to your computer and use it in GitHub Desktop.
This file contains 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 main | |
import ( | |
"log" | |
"os" | |
stream "github.com/GetStream/stream-chat-go/v2" | |
"github.com/joho/godotenv" | |
) | |
func main() { | |
err := godotenv.Load() | |
if err != nil { | |
log.Fatal("Error loading .env file") | |
} | |
APIKey := os.Getenv("STREAM_API_KEY") | |
APISecret := os.Getenv("STREAM_API_SECRET") | |
client, err := stream.NewClient(APIKey, []byte(APISecret)) | |
// handle error and do something with client | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment