Compare commits

..

No commits in common. "63d5d0dc5950638797f2fa8130b3b3d8d04097ca" and "d97a2f3bca07383dd4f85e3a031cbe849ef95d6d" have entirely different histories.

3 changed files with 0 additions and 48 deletions

View File

@ -1,18 +0,0 @@
package framework
import (
"net/http"
)
// Core is the core struct of the framework
type Core struct{}
// NewCore initialize the Core.
func NewCore() *Core {
return &Core{}
}
// ServeHTTP implements the Handler interface
func (c *Core) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// TODO
}

3
go.mod
View File

@ -1,3 +0,0 @@
module git.vinchent.xyz/vinchent/go-web
go 1.22.5

27
main.go
View File

@ -1,27 +0,0 @@
package main
import (
"fmt"
"html"
"log"
"net/http"
"git.vinchent.xyz/vinchent/go-web/framework"
)
type FooHandler struct{}
func (foo FooHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
}
func main() {
server := &http.Server{
Addr: ":8080",
Handler: framework.NewCore(),
}
if err := server.ListenAndServe(); err != nil {
log.Panic(err)
}
}