// mhoso project main.go
package main
import (
"log"
"net/http"
"./controller"
)
func main() {
http.HandleFunc("/", controller.IndexFunc)
http.HandleFunc("/search", controller.SearchFunc)
err := http.ListenAndServe(":8080", nil)
log.Println(err)
}
package controller
import (
"io/ioutil"
"log"
"net/http"
)
func SearchFunc(w http.ResponseWriter, r *http.Request) {
...
}