go fmt. vet
This commit is contained in:
parent
871790de23
commit
7e943c8b4d
2
Makefile
2
Makefile
|
@ -39,6 +39,8 @@ run: $(BINARY)
|
|||
./$(BINARY) -vv serve
|
||||
|
||||
$(BINARY): $(SOURCE) $(ROUTE_ASSET) $(VENDOR_FILES) $(DOCS_ASSET)
|
||||
go vet ./...
|
||||
go test ./...
|
||||
go build "sour.is/x/paste/cmd/paste"
|
||||
|
||||
$(ROUTE_ASSET): $(ROUTE_FILES)
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
package main // import "sour.is/x/paste/cmd/paste"
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
_ "sour.is/x/paste/src/docs"
|
||||
_ "sour.is/x/paste/src/routes"
|
||||
"sour.is/x/toolbox/httpsrv"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"sour.is/x/toolbox/log"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import "sour.is/x/toolbox/httpsrv"
|
|||
|
||||
func init() {
|
||||
httpsrv.AssetRegister("docs", httpsrv.AssetRoutes{
|
||||
{"Assets", "/docs/", httpsrv.FsHtml5(assetFS())},
|
||||
{Name: "Assets", Path: "/docs/", HandlerFunc: httpsrv.FsHtml5(assetFS())},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -27,15 +27,15 @@ func init() {
|
|||
httpsrv.RegisterModule("paste", setConfig)
|
||||
|
||||
httpsrv.HttpRegister("paste", httpsrv.HttpRoutes{
|
||||
{"getRandom", "GET", "/paste/rng", getRandom},
|
||||
{"getPaste", "GET", "/paste/{id}", getPaste},
|
||||
{"getPaste", "GET", "/paste/get/{id}", getPaste},
|
||||
{"postPaste", "POST", "/paste", postPaste},
|
||||
{Name: "getRandom", Method: "GET", Pattern: "/paste/rng", HandlerFunc: getRandom},
|
||||
{Name: "getPaste", Method: "GET", Pattern: "/paste/{id}", HandlerFunc: getPaste},
|
||||
{Name: "getPaste", Method: "GET", Pattern: "/paste/get/{id}", HandlerFunc: getPaste},
|
||||
{Name: "postPaste", Method: "POST", Pattern: "/paste", HandlerFunc: postPaste},
|
||||
|
||||
{"getRandom", "GET", "/api/rng", getRandom},
|
||||
{"getPaste", "GET", "/api/{id}", getPaste},
|
||||
{"getPaste", "GET", "/api/get/{id}", getPaste},
|
||||
{"postPaste", "POST", "/api", postPaste},
|
||||
{Name: "getRandom", Method: "GET", Pattern: "/api/rng", HandlerFunc: getRandom},
|
||||
{Name: "getPaste", Method: "GET", Pattern: "/api/{id}", HandlerFunc: getPaste},
|
||||
{Name: "getPaste", Method: "GET", Pattern: "/api/get/{id}", HandlerFunc: getPaste},
|
||||
{Name: "postPaste", Method: "POST", Pattern: "/api", HandlerFunc: postPaste},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import "sour.is/x/toolbox/httpsrv"
|
|||
|
||||
func init() {
|
||||
httpsrv.AssetRegister("paste", httpsrv.AssetRoutes{
|
||||
{"Assets", "/", httpsrv.FsHtml5(assetFS())},
|
||||
{Name: "Assets", Path: "/", HandlerFunc: httpsrv.FsHtml5(assetFS())},
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user