Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http.HandleFunc("/", handler)
- func handler(w http.ResponseWriter, r *http.Request) {
- if r.URL.Path != "/" {
- // Write custom 404 Page to w.Write()
- return
- }
- // Handling for route /
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement