Skip to content

Commit e1a6adb

Browse files
committed
chore: update format with GOFMT tool
Signed-off-by: Bo-Yi Wu <[email protected]>
1 parent ec4039c commit e1a6adb

File tree

8 files changed

+11
-9
lines changed

8 files changed

+11
-9
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: test
22

33
GO ?= go
4-
GOFMT ?= gofmt "-s"
4+
GOFMT ?= gofumpt -l -s
55
PACKAGES ?= $(shell $(GO) list ./...)
66
GOFILES := $(shell find . -name "*.go" -type f)
77

_example/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ func TestBasicHelloWorld(t *testing.T) {
1919
"X-Version": version,
2020
}).
2121
Run(BasicEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) {
22-
2322
assert.Equal(t, version, rq.Header.Get("X-Version"))
2423
assert.Equal(t, "Hello World", r.Body.String())
2524
assert.Equal(t, http.StatusOK, r.Code)
@@ -29,6 +28,7 @@ func TestBasicHelloWorld(t *testing.T) {
2928
func basicHTTPHelloHandler() {
3029
http.HandleFunc("/hello", basicHelloHandler)
3130
}
31+
3232
func TestBasicHttpHelloWorld(t *testing.T) {
3333
basicHTTPHelloHandler()
3434

_example/fiberEng.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package example
22

33
import (
44
"fmt"
5+
56
"github.com/gofiber/fiber/v2"
67
)
78

_example/fiberEng_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package example
22

33
import (
4-
"github.com/appleboy/gofight/v2"
5-
"github.com/stretchr/testify/assert"
64
"net/http"
75
"testing"
6+
7+
"github.com/appleboy/gofight/v2"
8+
"github.com/stretchr/testify/assert"
89
)
910

1011
func TestFiberEngine(t *testing.T) {
11-
1212
tests := []struct {
1313
name string
1414
path string

_example/httprouter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package example
22

33
import (
44
"fmt"
5-
"github.com/julienschmidt/httprouter"
65
"net/http"
6+
7+
"github.com/julienschmidt/httprouter"
78
)
89

910
func httpRouterHelloHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {

_example/mux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package example
22

33
import (
4-
"github.com/gorilla/mux"
54
"net/http"
5+
6+
"github.com/gorilla/mux"
67
)
78

89
func muxHelloHandler(w http.ResponseWriter, r *http.Request) {

gofight.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ type UploadFile struct {
110110

111111
// New supply initial structure
112112
func New() *RequestConfig {
113-
114113
return &RequestConfig{}
115114
}
116115

gofight_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ func TestBasicHelloWorld(t *testing.T) {
3030
"X-Version": version,
3131
}).
3232
Run(basicEngine(), func(r HTTPResponse, rq HTTPRequest) {
33-
3433
assert.Equal(t, version, rq.Header.Get("X-Version"))
3534
assert.Equal(t, "Hello World", r.Body.String())
3635
assert.Equal(t, http.StatusOK, r.Code)
@@ -40,6 +39,7 @@ func TestBasicHelloWorld(t *testing.T) {
4039
func basicHTTPHelloHandler() {
4140
http.HandleFunc("/hello", basicHelloHandler)
4241
}
42+
4343
func TestBasicHttpHelloWorld(t *testing.T) {
4444
basicHTTPHelloHandler()
4545

0 commit comments

Comments
 (0)