Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Commit

Permalink
use url.Values to encode the github credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
campoy committed Jul 1, 2015
1 parent 340040c commit 81c0b79
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions talksapp/main.go
Expand Up @@ -16,6 +16,7 @@ import (
"io"
"log"
"net/http"
"net/url"
"os"
"path"
"time"
Expand Down Expand Up @@ -56,9 +57,12 @@ func parseGithubCredentials() string {
log.Fatalf("parse github credentials: %v", err)
}
if cred.ClientID == "" || cred.ClientSecret == "" {
log.Fatal("secret.json needs to define ClientID and ClientSecret")
log.Fatalf("secret.json needs to define ClientID and ClientSecret")
}
return fmt.Sprintf("client_id=%s&client_secret=%s", cred.ClientID, cred.ClientSecret)
return url.Values{
"client_id": {cred.ClientID},
"client_secret": {cred.ClientSecret},
}.Encode()
}

func playable(c present.Code) bool {
Expand Down

0 comments on commit 81c0b79

Please sign in to comment.