Updated examples to match
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
package main
|
||||
|
||||
import "log"
|
||||
import "net/http"
|
||||
import "hnakra/service"
|
||||
|
||||
func main () {
|
||||
http.HandleFunc("/hello/", hellorld)
|
||||
err := service.NewHTTP("Hellorld", "A test service.", "@", "/hello/").Run()
|
||||
|
||||
if err != nil {
|
||||
log.Println("XXX", err)
|
||||
}
|
||||
service.NewService (
|
||||
"Hellorld", "A test service.",
|
||||
service.NewHTTP("@", "/hello/", nil)).Run()
|
||||
}
|
||||
|
||||
func hellorld (res http.ResponseWriter, req *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user