532278 (1) [Avatar] Offline
[ 749 bytes ]

Can somebody help me in my issues with manners. It seem to redirect all my request to home page and not on the correct url path. Setting nil to handler don;t work either, ith throws error. here is the code

package main

import (


type handler struct{}

func shutdownInterrupt(ch <-chan os.Signal) {

func hello(response http.ResponseWriter, request *http.Request) {
query := request.URL.Query()
name := query.Get("name")
fmt.Fprintf(response, "Hello %s", name)

func (h *handler) ServeHTTP(response http.ResponseWriter, request *http.Request) {
fmt.Fprintf(response, "Home Page!")

func newHandler() *handler {
return &handler{}

func main() {
ch := make(chan os.Signal)
handler := newHandler()

signal.Notify(ch, os.Interrupt, os.Kill)
go shutdownInterrupt(ch)

http.HandleFunc("/hello", hello)
manners.ListenAndServe(":8888", handler)