You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: oauth.go
    path of file: ./repos/highlight/backend/alerts/integrations/discord
    
    the code of the file until where you have to start completion: package discord

import (
	"context"
	"os"

	"github.com/pkg/errors"

	"golang.org/x/oauth2"
)

var Endpoint
    
func oauthConfig() (*oauth2.Config, error) {
	var (
		ok                  bool
		DiscordClientID     string
		DiscordClientSecret string
		FrontendUri         string
	)
	if DiscordClientID, ok = os.LookupEnv("DISCORD_CLIENT_ID"); !ok || DiscordClientID == "" {
		return nil, errors.New("DISCORD_CLIENT_ID not set")
	}
	if DiscordClientSecret, ok = os.LookupEnv("DISCORD_CLIENT_SECRET"); !ok || DiscordClientSecret == "" {
		return nil, errors.New("DISCORD_CLIENT_SECRET not set")
	}
	if FrontendUri, ok = os.LookupEnv("REACT_APP_FRONTEND_URI"); !ok || FrontendUri == "" {
		return nil, errors.New("REACT_APP_FRONTEND_URI not set")
	}

	return &oauth2.Config{
		ClientID:     DiscordClientID,
		ClientSecret: DiscordClientSecret,
		Endpoint:     Endpoint,
		RedirectURL:  FrontendUri + "/callback/discord",
	}, nil
}