Skip to content

Instantly share code, notes, and snippets.

@ayoisaiah
Created March 6, 2020 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayoisaiah/8b98d306141e5426dd13ca09e5c8bf84 to your computer and use it in GitHub Desktop.
Save ayoisaiah/8b98d306141e5426dd13ca09e5c8bf84 to your computer and use it in GitHub Desktop.
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