Пример #1
0
func (s *ServerController) Status(kr *knot.Request) interface{} {
	ret := "Sebar Server v 0.9 (c) EACIIT \n"
	keys := kr.QueryKeys()
	for _, k := range keys {
		ret += fmt.Sprintf("%s = %v \n", k, kr.Query(k))
	}
	return ret
}
Пример #2
0
func (w *WorldController) Say(r *knot.Request) interface{} {
	r.ResponseConfig().OutputType = knot.OutputHtml
	s := "<b>Hello World</b>&nbsp;"
	name := r.Query("name")
	if name != "" {
		s = s + " " + name
	}
	s += "</br>"
	return s
}