Skip to content

Commit

Permalink
gofmt everything
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Aug 25, 2019
1 parent bfb1517 commit abffb0d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
11 changes: 6 additions & 5 deletions auth_server/authn/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth_server/authn/ldap_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"io/ioutil"
"strings"

"github.com/go-ldap/ldap"
"github.com/cesanta/glog"
"github.com/go-ldap/ldap"
)

type LabelMap struct {
Expand Down
20 changes: 10 additions & 10 deletions auth_server/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,16 +365,16 @@ func (as *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
// https://developers.google.com/identity/sign-in/web/server-side-flow
func (as *AuthServer) doIndex(rw http.ResponseWriter, req *http.Request) {
switch {
case as.ga != nil:
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(rw, "<h1>%s</h1>\n", as.config.Token.Issuer)
fmt.Fprint(rw, `<p><a href="/google_auth">Login with Google account</a></p>`)
case as.gha != nil:
url := as.config.Server.PathPrefix + "/github_auth"
http.Redirect(rw, req, url, 301)
default:
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(rw, "<h1>%s</h1>\n", as.config.Token.Issuer)
case as.ga != nil:
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(rw, "<h1>%s</h1>\n", as.config.Token.Issuer)
fmt.Fprint(rw, `<p><a href="/google_auth">Login with Google account</a></p>`)
case as.gha != nil:
url := as.config.Server.PathPrefix + "/github_auth"
http.Redirect(rw, req, url, 301)
default:
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
fmt.Fprintf(rw, "<h1>%s</h1>\n", as.config.Token.Issuer)
}
}

Expand Down

0 comments on commit abffb0d

Please sign in to comment.