18 lines
370 B
Go
18 lines
370 B
Go
|
|
package api
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/julienschmidt/httprouter"
|
||
|
|
)
|
||
|
|
|
||
|
|
func IndexHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||
|
|
fmt.Fprintf(w, string("hello there"))
|
||
|
|
}
|
||
|
|
|
||
|
|
func TableHandler(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
|
||
|
|
tableName := params.ByName("name")
|
||
|
|
fmt.Fprintf(w, "hello %s", tableName)
|
||
|
|
}
|