From 6f669bf6e63da270077a0f24e3779fa041b97cad Mon Sep 17 00:00:00 2001 From: ybkuroki <45133652+ybkuroki@users.noreply.github.com> Date: Sun, 2 May 2021 16:54:12 +0900 Subject: [PATCH 1/3] Update version of golang and ci-lint --- .github/.golangci.yml | 2 +- .github/workflows/check.yml | 2 +- .github/workflows/release.yml | 2 +- go.mod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/.golangci.yml b/.github/.golangci.yml index a68f9226..2ebd8c11 100644 --- a/.github/.golangci.yml +++ b/.github/.golangci.yml @@ -55,4 +55,4 @@ linters: # https://github.com/golangci/golangci/wiki/Configuration # latest version: https://github.com/golangci/golangci-lint service: - golangci-lint-version: 1.33.0 + golangci-lint-version: 1.39.0 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a7adee6f..d5b65a61 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -13,7 +13,7 @@ jobs: - name: set up uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.16 id: go # Check out this repository - name: checkout diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01db4e8a..d4bb6ae0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.16 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: diff --git a/go.mod b/go.mod index c2f02f7f..f469ab09 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ybkuroki/go-webapp-sample -go 1.14 +go 1.16 require ( github.com/garyburd/redigo v1.6.2 // indirect From ce37989884ba6fecc87b88aa248904ff5707f269 Mon Sep 17 00:00:00 2001 From: ybkuroki <45133652+ybkuroki@users.noreply.github.com> Date: Mon, 3 May 2021 16:30:25 +0900 Subject: [PATCH 2/3] Fixed the endpoint for getting book data --- README.md | 2 +- controller/api_const.go | 2 -- router/router.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90953f85..6eb1a474 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ There are the following services in the book management. |Service Name|HTTP Method|URL|Parameter|Summary| |:---|:---:|:---|:---|:---| -|Get Service|GET|``/api/book/get?id=[BOOK_ID]``|Book ID|Get a book data.| +|Get Service|GET|``/api/book?id=[BOOK_ID]``|Book ID|Get a book data.| |List Service|GET|``/api/book/list?page=[PAGE_NUMBER]&size=[PAGE_SIZE]``|Page|Get a list of books.| |Regist Service|POST|``/api/book/new``|Book|Regist a book data.| |Edit Service|POST|``/api/book/edit``|Book|Edit a book data.| diff --git a/controller/api_const.go b/controller/api_const.go index 6c1c2262..266ee5cb 100644 --- a/controller/api_const.go +++ b/controller/api_const.go @@ -5,8 +5,6 @@ const ( API = "/api" // APIBook represents the group of book management API. APIBook = API + "/book" - // APIBookGet represents the API to get one book. - APIBookGet = APIBook + "/get" // APIBookList represents the API to get book's list. APIBookList = APIBook + "/list" // APIBookSearch represents the API to search book's list. diff --git a/router/router.go b/router/router.go index 2d53747d..c03ab9f8 100644 --- a/router/router.go +++ b/router/router.go @@ -42,7 +42,7 @@ func Init(e *echo.Echo, context mycontext.Context) { account := controller.NewAccountController(context) health := controller.NewHealthController(context) - e.GET(controller.APIBookGet, func(c echo.Context) error { return book.GetBook(c) }) + e.GET(controller.APIBook, func(c echo.Context) error { return book.GetBook(c) }) e.GET(controller.APIBookList, func(c echo.Context) error { return book.GetBookList(c) }) e.GET(controller.APIBookSearch, func(c echo.Context) error { return book.GetBookSearch(c) }) e.POST(controller.APIBookRegist, func(c echo.Context) error { return book.PostBookRegist(c) }) From 49c5d5d88049326d1cb51ad7a0c6fd324edb4a40 Mon Sep 17 00:00:00 2001 From: ybkuroki <45133652+ybkuroki@users.noreply.github.com> Date: Tue, 4 May 2021 17:23:26 +0900 Subject: [PATCH 3/3] bump --- public/index.html | 2 +- public/js/app.00c75836.js | 1 + public/js/app.4dd6524e.js | 1 - ...ors.63b1e6ef.js => chunk-vendors.674ee411.js} | 16 ++++++++-------- ...manifest.bb82bb163ab7db72c7bb44d916a17890.js} | 14 +++++++------- public/service-worker.js | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 public/js/app.00c75836.js delete mode 100644 public/js/app.4dd6524e.js rename public/js/{chunk-vendors.63b1e6ef.js => chunk-vendors.674ee411.js} (76%) rename public/{precache-manifest.7bd3992d9db14a41d716a79ef5e073c9.js => precache-manifest.bb82bb163ab7db72c7bb44d916a17890.js} (57%) diff --git a/public/index.html b/public/index.html index ab912c6f..5d2b4b89 100644 --- a/public/index.html +++ b/public/index.html @@ -1 +1 @@ -