makefile: build
This commit is contained in:
parent
c0bdfa469f
commit
0e08a84842
|
@ -0,0 +1 @@
|
|||
/bin/*
|
|
@ -0,0 +1,8 @@
|
|||
build: fmt
|
||||
CGO_ENABLED=0 go build -ldflags '-s -w' -v -o bin/main ./
|
||||
|
||||
tool-gofumpt:
|
||||
which golangci-lint > /dev/null 2>&1 || go install mvdan.cc/gofumpt@latest
|
||||
|
||||
fmt: tool-gofumpt
|
||||
gofumpt -w --extra .
|
8
main.go
8
main.go
|
@ -3,12 +3,13 @@ package main
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"github.com/urfave/cli/v2"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var Commands = []*cli.Command{}
|
||||
|
@ -97,7 +98,6 @@ func apiList(ctx echo.Context, directory, url string) error {
|
|||
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return ctx.String(http.StatusInternalServerError, fmt.Sprintf("{\"error\":\"%s\"", err))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue