<commit_before>package usecases

import (
	"encoding/json"
	"net/http"
	"net/url"

	"github.com/digital-ocean-service/domain"
)

type DOInteractor struct {
}

const authURL = "https://cloud.digitalocean.com/v1/oauth/authorize"

func (interactor DOInteractor) GetOauthURL(id, redirectURI, scope string) string {
	u, _ := url.Parse(authURL)
	q := u.Query()
	q.Set("client_id", id)
	q.Set("redirect_uri", redirectURI)
	q.Set("scope", scope)
	q.Set("response_type", "code")

	u.RawQuery = q.Encode()
<commit_msg>Modify the way to get the OAUTH URI<commit_after>package usecases

import (
	"encoding/json"
	"net/http"
	"net/url"
	"strings"

	"github.com/digital-ocean-service/domain"
)

type DOInteractor struct {
}

const authURL = "https://cloud.digitalocean.com/v1/oauth/authorize"

func (interactor DOInteractor) GetOauthURL(id, redirectURI string, scope []string) string {

	scp := strings.Join(scope, " ")

	u, _ := url.Parse(authURL)
	q := u.Query()
	q.Set("client_id", id)
	q.Set("redirect_uri", redirectURI)
	q.Set("scope", scp)
	q.Set("response_type", "code")

	u.RawQuery = q.Encode()

{'fraction_non_alphanumeric': 0.16315307057745188, 'fraction_numerical': 0.0018331805682859762, 'mean_word_length': 4.747368421052632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6493636', 'n_tokens_mistral': 433, 'n_tokens_neox': 424, 'n_words': 81}