Skip to content

Commit

Permalink
chore: ignore lint in demo app
Browse files Browse the repository at this point in the history
  • Loading branch information
liut committed Apr 19, 2024
1 parent c881825 commit 3af7da9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/staffio-demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ func main() {

zlogger, _ = zap.NewDevelopment()

defer zlogger.Sync() // flushes buffer, if any
defer func() {
_ = zlogger.Sync() // flushes buffer, if any
}()

sugar := zlogger.Sugar()

zlog.SetLogger(sugar)
Expand Down
3 changes: 3 additions & 0 deletions cmd/staffio-demo/oauthapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func init() {

}

// nolint
func (d *demo) strap(router serverMux) {
// Application home endpoint
router.HandleFunc("/app", func(w http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -357,6 +358,7 @@ func (d *demo) strap(router serverMux) {

}

// nolint
func HandleLoginPage(ar *osin.AuthorizeRequest, w http.ResponseWriter, r *http.Request) bool {
r.ParseForm()
if r.Method == "POST" && r.Form.Get("login") == "test" && r.Form.Get("password") == "test" {
Expand All @@ -380,6 +382,7 @@ func HandleLoginPage(ar *osin.AuthorizeRequest, w http.ResponseWriter, r *http.R
return false
}

// nolint
func downloadAccessToken(url string, auth *osin.BasicAuth, output map[string]interface{}) error {
// download access token
logger().Debugw("download access token", "url", url)
Expand Down

0 comments on commit 3af7da9

Please sign in to comment.