Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 22, 2023

Bumps github.com/gin-gonic/gin from 1.8.2 to 1.9.0.

Release notes

Sourced from github.com/gin-gonic/gin's releases.

v1.9.0

Changelog

BREAK CHANGES

  • Stop useless panicking in context and render #2150

BUG FIXES

  • fix(router): tree bug where loop index is not decremented. #3460
  • fix(context): panic on NegotiateFormat - index out of range #3397
  • Add escape logic for header #3500 and #3503

SECURITY

  • Fix the GO-2022-0969 and GO-2022-0288 vulnerabilities #3333
  • fix(security): vulnerability GO-2023-1571 #3505

ENHANCEMENTS

  • feat: add sonic json support #3184
  • chore(file): Creates a directory named path #3316
  • fix: modify interface check way #3327
  • remove deprecated of package io/ioutil #3395
  • refactor: avoid calling strings.ToLower twice #3343
  • console logger HTTP status code bug fixed #3453
  • chore(yaml): upgrade dependency to v3 version #3456
  • chore(router): match method added to routergroup for multiple HTTP methods supporting #3464
  • chore(http): add support for go1.20 http.rwUnwrapper to gin.responseWriter #3489

DOCS

  • docs: update markdown format #3260
  • docs(readme): Add the TOML rendering example #3400
  • docs(readme): move more example to docs/doc.md #3449
  • docs: update markdown format #3446
Changelog

Sourced from github.com/gin-gonic/gin's changelog.

Gin v1.9.0

BREAK CHANGES

  • Stop useless panicking in context and render #2150

BUG FIXES

  • fix(router): tree bug where loop index is not decremented. #3460
  • fix(context): panic on NegotiateFormat - index out of range #3397
  • Add escape logic for header #3500 and #3503

SECURITY

  • Fix the GO-2022-0969 and GO-2022-0288 vulnerabilities #3333
  • fix(security): vulnerability GO-2023-1571 #3505

ENHANCEMENTS

  • feat: add sonic json support #3184
  • chore(file): Creates a directory named path #3316
  • fix: modify interface check way #3327
  • remove deprecated of package io/ioutil #3395
  • refactor: avoid calling strings.ToLower twice #3343
  • console logger HTTP status code bug fixed #3453
  • chore(yaml): upgrade dependency to v3 version #3456
  • chore(router): match method added to routergroup for multiple HTTP methods supporting #3464
  • chore(http): add support for go1.20 http.rwUnwrapper to gin.responseWriter #3489

DOCS

  • docs: update markdown format #3260
  • docs(readme): Add the TOML rendering example #3400
  • docs(readme): move more example to docs/doc.md #3449
  • docs: update markdown format #3446
Commits
  • ea03e10 docs(readme): release v1.9.0 version (#3474)
  • 4cee78f Fix #3500 Add escape logic for header (#3503)
  • fc1c432 fix(security): vulnerability GO-2023-1571 (#3505)
  • 81ac7d5 Add escape logic for header (#3500)
  • d07db17 chore(deps): bump golang.org/x/net from 0.5.0 to 0.6.0 (#3498)
  • c1d06e3 add supprt for go1.20 http.rwUnwrapper to gin.responseWriter (#3489)
  • bd82c9e chore(go): Add support go 1.20 (#3484)
  • 0c96a20 Stop useless panicking in context and render (#2150)
  • 153b229 chore(deps): bump github.com/ugorji/go/codec from 1.2.8 to 1.2.9 (#3491)
  • e02ae6a chore(router): match method added to routergroup for multiple HTTP methods su...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](gin-gonic/gin@v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Feb 22, 2023
@github-actions
Copy link

Quality Gate Status

PASSED: actual coverage 36.7% >= 25% (threshold)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Goimports Failure

handlers/handlers_test.go
)
 
 /*
-func TestNewHandler(t *testing.T) {
-	tests := []struct {
-		name string
-		want *itemHandler
-	}{
-		// TODO: Add test cases.
+	func TestNewHandler(t *testing.T) {
+		tests := []struct {
+			name string
+			want *itemHandler
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				if got := NewItemHandler(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("NewItemHandler() = %v, want %v", got, tt.want)
+				}
+			})
+		}
 	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			if got := NewItemHandler(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("NewItemHandler() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
 
-func TestHandler_CreateItem(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
+	func TestHandler_CreateItem(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		type args struct {
+			c *gin.Context
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			args   args
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+			})
+		}
 	}
-	type args struct {
-		c *gin.Context
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		args   args
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-		})
-	}
-}
 
-func TestHandler_DeleteItem(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
+	func TestHandler_DeleteItem(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		type args struct {
+			c *gin.Context
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			args   args
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+			})
+		}
 	}
-	type args struct {
-		c *gin.Context
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		args   args
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-		})
-	}
-}
 
-func TestHandler_FindItem(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
+	func TestHandler_FindItem(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		type args struct {
+			c *gin.Context
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			args   args
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+			})
+		}
 	}
-	type args struct {
-		c *gin.Context
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		args   args
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-		})
-	}
-}
 
-func TestHandler_GetItemService(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
+	func TestHandler_GetItemService(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			want   services.ItemService
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+				if got := p.GetItemService(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("GetItemService() = %v, want %v", got, tt.want)
+				}
+			})
+		}
 	}
-	tests := []struct {
-		name   string
-		fields fields
-		want   services.ItemService
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-			if got := p.GetItemService(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("GetItemService() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
 */
 func TestHandler_ListItems(t *testing.T) {
 	tests := []struct {
services/services_test.go
)
 
 /*
-func TestNewItemService(t *testing.T) {
-	tests := []struct {
-		name string
-		want *ItemService
-	}{
-		// TODO: Add test cases.
+	func TestNewItemService(t *testing.T) {
+		tests := []struct {
+			name string
+			want *ItemService
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				if got := NewItemService(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("NewItemService() = %v, want %v", got, tt.want)
+				}
+			})
+		}
 	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			if got := NewItemService(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("NewItemService() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
 
-func Test_itemService_CreateItem(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
+	func Test_itemService_CreateItem(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		type args struct {
+			input models.CreateItemInput
+		}
+		tests := []struct {
+			name    string
+			fields  fields
+			args    args
+			want    models.Item
+			wantErr bool
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				got, err := s.CreateItem(tt.args.input)
+				if (err != nil) != tt.wantErr {
+					t.Errorf("CreateItem() error = %v, wantErr %v", err, tt.wantErr)
+					return
+				}
+				if !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("CreateItem() got = %v, want %v", got, tt.want)
+				}
+			})
+		}
 	}
-	type args struct {
-		input models.CreateItemInput
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		want    models.Item
-		wantErr bool
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			got, err := s.CreateItem(tt.args.input)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("CreateItem() error = %v, wantErr %v", err, tt.wantErr)
-				return
-			}
-			if !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("CreateItem() got = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
 
-func Test_itemService_DeleteItem(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
+	func Test_itemService_DeleteItem(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		type args struct {
+			id string
+		}
+		tests := []struct {
+			name    string
+			fields  fields
+			args    args
+			wantErr bool
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				if err := s.DeleteItem(tt.args.id); (err != nil) != tt.wantErr {
+					t.Errorf("DeleteItem() error = %v, wantErr %v", err, tt.wantErr)
+				}
+			})
+		}
 	}
-	type args struct {
-		id string
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			if err := s.DeleteItem(tt.args.id); (err != nil) != tt.wantErr {
-				t.Errorf("DeleteItem() error = %v, wantErr %v", err, tt.wantErr)
-			}
-		})
-	}
-}
 
-func Test_itemService_FindItem(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
+	func Test_itemService_FindItem(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		type args struct {
+			id string
+		}
+		tests := []struct {
+			name    string
+			fields  fields
+			args    args
+			want    models.Item
+			want1   bool
+			wantErr bool
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				got, got1, err := s.FindItem(tt.args.id)
+				if (err != nil) != tt.wantErr {
+					t.Errorf("FindItem() error = %v, wantErr %v", err, tt.wantErr)
+					return
+				}
+				if !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("FindItem() got = %v, want %v", got, tt.want)
+				}
+				if got1 != tt.want1 {
+					t.Errorf("FindItem() got1 = %v, want %v", got1, tt.want1)
+				}
+			})
+		}
 	}
-	type args struct {
-		id string
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		want    models.Item
-		want1   bool
-		wantErr bool
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			got, got1, err := s.FindItem(tt.args.id)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("FindItem() error = %v, wantErr %v", err, tt.wantErr)
-				return
-			}
-			if !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("FindItem() got = %v, want %v", got, tt.want)
-			}
-			if got1 != tt.want1 {
-				t.Errorf("FindItem() got1 = %v, want %v", got1, tt.want1)
-			}
-		})
-	}
-}
 
-func Test_itemService_GetItemRepository(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
+	func Test_itemService_GetItemRepository(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			want   repository.ItemRepository
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				if got := s.GetItemRepository(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("GetItemRepository() = %v, want %v", got, tt.want)
+				}
+			})
+		}
 	}
-	tests := []struct {
-		name   string
-		fields fields
-		want   repository.ItemRepository
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			if got := s.GetItemRepository(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("GetItemRepository() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
 */
 func Test_itemService_ListItems(t *testing.T) {
 	sold := true

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint Success!

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Gofmt Failure

handlers/handlers_test.go
)
 
 /*
-func TestNewHandler(t *testing.T) {
-	tests := []struct {
-		name string
-		want *itemHandler
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			if got := NewItemHandler(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("NewItemHandler() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func TestHandler_CreateItem(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
-	}
-	type args struct {
-		c *gin.Context
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		args   args
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-		})
-	}
-}
-
-func TestHandler_DeleteItem(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
-	}
-	type args struct {
-		c *gin.Context
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		args   args
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-		})
-	}
-}
-
-func TestHandler_FindItem(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
-	}
-	type args struct {
-		c *gin.Context
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		args   args
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-		})
-	}
-}
-
-func TestHandler_GetItemService(t *testing.T) {
-	type fields struct {
-		s *services.ItemService
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		want   services.ItemService
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			p := &itemHandler{
-				s: tt.fields.s,
-			}
-			if got := p.GetItemService(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("GetItemService() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
+	func TestNewHandler(t *testing.T) {
+		tests := []struct {
+			name string
+			want *itemHandler
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				if got := NewItemHandler(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("NewItemHandler() = %v, want %v", got, tt.want)
+				}
+			})
+		}
+	}
+
+	func TestHandler_CreateItem(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		type args struct {
+			c *gin.Context
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			args   args
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+			})
+		}
+	}
+
+	func TestHandler_DeleteItem(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		type args struct {
+			c *gin.Context
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			args   args
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+			})
+		}
+	}
+
+	func TestHandler_FindItem(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		type args struct {
+			c *gin.Context
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			args   args
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+			})
+		}
+	}
+
+	func TestHandler_GetItemService(t *testing.T) {
+		type fields struct {
+			s *services.ItemService
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			want   services.ItemService
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				p := &itemHandler{
+					s: tt.fields.s,
+				}
+				if got := p.GetItemService(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("GetItemService() = %v, want %v", got, tt.want)
+				}
+			})
+		}
+	}
 */
 func TestHandler_ListItems(t *testing.T) {
 	tests := []struct {
services/services_test.go
)
 
 /*
-func TestNewItemService(t *testing.T) {
-	tests := []struct {
-		name string
-		want *ItemService
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			if got := NewItemService(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("NewItemService() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_itemService_CreateItem(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
-	}
-	type args struct {
-		input models.CreateItemInput
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		want    models.Item
-		wantErr bool
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			got, err := s.CreateItem(tt.args.input)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("CreateItem() error = %v, wantErr %v", err, tt.wantErr)
-				return
-			}
-			if !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("CreateItem() got = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
-
-func Test_itemService_DeleteItem(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
-	}
-	type args struct {
-		id string
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		wantErr bool
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			if err := s.DeleteItem(tt.args.id); (err != nil) != tt.wantErr {
-				t.Errorf("DeleteItem() error = %v, wantErr %v", err, tt.wantErr)
-			}
-		})
-	}
-}
-
-func Test_itemService_FindItem(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
-	}
-	type args struct {
-		id string
-	}
-	tests := []struct {
-		name    string
-		fields  fields
-		args    args
-		want    models.Item
-		want1   bool
-		wantErr bool
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			got, got1, err := s.FindItem(tt.args.id)
-			if (err != nil) != tt.wantErr {
-				t.Errorf("FindItem() error = %v, wantErr %v", err, tt.wantErr)
-				return
-			}
-			if !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("FindItem() got = %v, want %v", got, tt.want)
-			}
-			if got1 != tt.want1 {
-				t.Errorf("FindItem() got1 = %v, want %v", got1, tt.want1)
-			}
-		})
-	}
-}
-
-func Test_itemService_GetItemRepository(t *testing.T) {
-	type fields struct {
-		r *repository.ItemRepository
-	}
-	tests := []struct {
-		name   string
-		fields fields
-		want   repository.ItemRepository
-	}{
-		// TODO: Add test cases.
-	}
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			s := &itemService{
-				r: tt.fields.r,
-			}
-			if got := s.GetItemRepository(); !reflect.DeepEqual(got, tt.want) {
-				t.Errorf("GetItemRepository() = %v, want %v", got, tt.want)
-			}
-		})
-	}
-}
+	func TestNewItemService(t *testing.T) {
+		tests := []struct {
+			name string
+			want *ItemService
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				if got := NewItemService(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("NewItemService() = %v, want %v", got, tt.want)
+				}
+			})
+		}
+	}
+
+	func Test_itemService_CreateItem(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		type args struct {
+			input models.CreateItemInput
+		}
+		tests := []struct {
+			name    string
+			fields  fields
+			args    args
+			want    models.Item
+			wantErr bool
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				got, err := s.CreateItem(tt.args.input)
+				if (err != nil) != tt.wantErr {
+					t.Errorf("CreateItem() error = %v, wantErr %v", err, tt.wantErr)
+					return
+				}
+				if !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("CreateItem() got = %v, want %v", got, tt.want)
+				}
+			})
+		}
+	}
+
+	func Test_itemService_DeleteItem(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		type args struct {
+			id string
+		}
+		tests := []struct {
+			name    string
+			fields  fields
+			args    args
+			wantErr bool
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				if err := s.DeleteItem(tt.args.id); (err != nil) != tt.wantErr {
+					t.Errorf("DeleteItem() error = %v, wantErr %v", err, tt.wantErr)
+				}
+			})
+		}
+	}
+
+	func Test_itemService_FindItem(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		type args struct {
+			id string
+		}
+		tests := []struct {
+			name    string
+			fields  fields
+			args    args
+			want    models.Item
+			want1   bool
+			wantErr bool
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				got, got1, err := s.FindItem(tt.args.id)
+				if (err != nil) != tt.wantErr {
+					t.Errorf("FindItem() error = %v, wantErr %v", err, tt.wantErr)
+					return
+				}
+				if !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("FindItem() got = %v, want %v", got, tt.want)
+				}
+				if got1 != tt.want1 {
+					t.Errorf("FindItem() got1 = %v, want %v", got1, tt.want1)
+				}
+			})
+		}
+	}
+
+	func Test_itemService_GetItemRepository(t *testing.T) {
+		type fields struct {
+			r *repository.ItemRepository
+		}
+		tests := []struct {
+			name   string
+			fields fields
+			want   repository.ItemRepository
+		}{
+			// TODO: Add test cases.
+		}
+		for _, tt := range tests {
+			t.Run(tt.name, func(t *testing.T) {
+				s := &itemService{
+					r: tt.fields.r,
+				}
+				if got := s.GetItemRepository(); !reflect.DeepEqual(got, tt.want) {
+					t.Errorf("GetItemRepository() = %v, want %v", got, tt.want)
+				}
+			})
+		}
+	}
 */
 func Test_itemService_ListItems(t *testing.T) {
 	sold := true

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Errcheck Success!

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Staticcheck Failure

routers/routers_test.go:9:2: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.  (SA1019)

Checks Document

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Govet Failure

routers/routers_test.go:9:2: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.  (SA1019)

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shadow Success!

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Gosec Failure

Gosec : dev
Files : 10
Lines : 547
Nosec : 0
Issues : 0

Show Detail
Results:


Summary:
  Gosec  : dev
  Files  : 10
  Lines  : 547
  Nosec  : 0
  Issues : 0

Code Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants