Skip to content

Instantly share code, notes, and snippets.

@cheikhsimsol
Created February 7, 2024 21:10
Show Gist options
  • Save cheikhsimsol/9aa1a0df1721ac17492d62e6f0fd366a to your computer and use it in GitHub Desktop.
Save cheikhsimsol/9aa1a0df1721ac17492d62e6f0fd366a to your computer and use it in GitHub Desktop.
package main
...
func main() {
mux := http.NewServeMux()
// Map a route to handle requests to the root path ("/")
mux.HandleFunc("GET /login", func(w http.ResponseWriter, r *http.Request) {
// section to redirect user
})
mux.HandleFunc("GET /consume", func(w http.ResponseWriter, r *http.Request) {
// redirect url to get user information
})
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment