File: mux.go

package info (click to toggle)
golang-github-appleboy-gofight 2.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 212 kB
  • sloc: makefile: 50
file content (18 lines) | stat: -rw-r--r-- 295 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package example

import (
	"github.com/gorilla/mux"
	"net/http"
)

func muxHelloHandler(w http.ResponseWriter, r *http.Request) {
	w.Write([]byte("Hello World"))
}

// MuxEngine is mux router.
func MuxEngine() *mux.Router {
	r := mux.NewRouter()
	r.HandleFunc("/", muxHelloHandler)

	return r
}