Skip to content

Commit b89d948

Browse files
committed
golangci-lint fixes
1 parent a5fd42e commit b89d948

File tree

7 files changed

+10
-6
lines changed

7 files changed

+10
-6
lines changed

cmd/cart/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"github.com/benc-uk/go-rest-api/pkg/auth"
2020
"github.com/benc-uk/go-rest-api/pkg/env"
2121
"github.com/benc-uk/go-rest-api/pkg/logging"
22-
"github.com/go-chi/chi/middleware"
2322
"github.com/go-chi/chi/v5"
23+
"github.com/go-chi/chi/v5/middleware"
2424

2525
_ "github.com/joho/godotenv/autoload" // Autoloads .env file if it exists
2626
)

cmd/frontend-host/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717

1818
"github.com/benc-uk/go-rest-api/pkg/env"
1919
"github.com/benc-uk/go-rest-api/pkg/static"
20-
"github.com/go-chi/chi"
20+
"github.com/go-chi/chi/v5"
2121
_ "github.com/joho/godotenv/autoload" // Autoloads .env file if it exists
2222
)
2323

cmd/orders/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import (
2020
"github.com/benc-uk/go-rest-api/pkg/dapr/pubsub"
2121
"github.com/benc-uk/go-rest-api/pkg/env"
2222
"github.com/benc-uk/go-rest-api/pkg/logging"
23-
"github.com/go-chi/chi/middleware"
2423
"github.com/go-chi/chi/v5"
24+
"github.com/go-chi/chi/v5/middleware"
2525

2626
_ "github.com/joho/godotenv/autoload" // Autoloads .env file if it exists
2727
)

cmd/orders/orders_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func TestOrders(t *testing.T) {
4141

4242
t.Run("process empty order", func(t *testing.T) {
4343
emptyOrder := spec.Order{}
44+
4445
err := mockOrdersSvc.ProcessOrder(emptyOrder)
4546
if err != nil && strings.Contains(err.Error(), "validation") {
4647
} else {
@@ -53,6 +54,7 @@ func TestOrders(t *testing.T) {
5354
LineItems: []spec.LineItem{},
5455
ForUserID: "",
5556
}
57+
5658
err := mockOrdersSvc.ProcessOrder(badOrder)
5759
if err != nil && strings.Contains(err.Error(), "validation") {
5860
} else {
@@ -62,6 +64,7 @@ func TestOrders(t *testing.T) {
6264

6365
t.Run("process valid new order", func(t *testing.T) {
6466
goodOrder := mock.MockOrders[0]
67+
6568
err := mockOrdersSvc.ProcessOrder(goodOrder)
6669
if err != nil {
6770
t.Errorf("'process valid new order' failed %+v", err)
@@ -81,6 +84,7 @@ func TestOrders(t *testing.T) {
8184

8285
t.Run("order processing completed", func(t *testing.T) {
8386
time.Sleep(time.Second * 3)
87+
8488
newOrder, err := mockOrdersSvc.GetOrder("ord-mock")
8589
if err != nil {
8690
t.Errorf("'order processing completed' failed: %+v", err)

cmd/products/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"github.com/benc-uk/go-rest-api/pkg/api"
2020
"github.com/benc-uk/go-rest-api/pkg/env"
2121
"github.com/benc-uk/go-rest-api/pkg/logging"
22-
"github.com/go-chi/chi/middleware"
2322
"github.com/go-chi/chi/v5"
23+
"github.com/go-chi/chi/v5/middleware"
2424

2525
_ "github.com/joho/godotenv/autoload" // Autoloads .env file if it exists
2626
_ "github.com/mattn/go-sqlite3"

cmd/users/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515

1616
"github.com/azure-samples/dapr-store/cmd/users/impl"
1717
"github.com/azure-samples/dapr-store/cmd/users/spec"
18-
"github.com/go-chi/chi/middleware"
1918
"github.com/go-chi/chi/v5"
19+
"github.com/go-chi/chi/v5/middleware"
2020

2121
"github.com/benc-uk/go-rest-api/pkg/api"
2222
"github.com/benc-uk/go-rest-api/pkg/auth"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.21
55
require (
66
github.com/benc-uk/go-rest-api v1.0.11
77
github.com/dapr/go-sdk v1.9.1
8-
github.com/go-chi/chi v4.1.1+incompatible
98
github.com/go-chi/chi/v5 v5.0.11
109
github.com/joho/godotenv v1.5.1
1110
github.com/mattn/go-sqlite3 v1.14.19
@@ -18,6 +17,7 @@ require (
1817
github.com/dapr/dapr v1.12.0-rc.4 // indirect
1918
github.com/elastic/go-sysinfo v1.11.1 // indirect
2019
github.com/elastic/go-windows v1.0.0 // indirect
20+
github.com/go-chi/chi v4.1.1+incompatible // indirect
2121
github.com/go-chi/cors v1.2.1 // indirect
2222
github.com/golang-jwt/jwt/v5 v5.1.0 // indirect
2323
github.com/golang/protobuf v1.5.3 // indirect

0 commit comments

Comments
 (0)