A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
chore(lint): lint code and regenerate docs
LinkinStarscb5a0b704599
diff --git a/docs/docs.go b/docs/docs.goindex 376cdf07..cf218a56 100644--- a/docs/docs.go+++ b/docs/docs.go@@ -4185,6 +4185,67 @@ const docTemplate = `{}}},+ "/answer/api/v1/question/recommend/page": {+ "get": {+ "description": "get recommend questions by page",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "Question"+ ],+ "summary": "get recommend questions by page",+ "parameters": [+ {+ "description": "QuestionPageReq",+ "name": "data",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/schema.QuestionPageReq"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "allOf": [+ {+ "$ref": "#/definitions/handler.RespBody"+ },+ {+ "type": "object",+ "properties": {+ "data": {+ "allOf": [+ {+ "$ref": "#/definitions/pager.PageModel"+ },+ {+ "type": "object",+ "properties": {+ "list": {+ "type": "array",+ "items": {+ "$ref": "#/definitions/schema.QuestionPageResp"+ }+ }+ }+ }+ ]+ }+ }+ }+ ]+ }+ }+ }+ }+ },"/answer/api/v1/question/recover": {"post": {"security": [@@ -6586,14 +6647,14 @@ const docTemplate = `{},"/custom.css": {"get": {- "description": "get site robots information",+ "description": "get site custom CSS","produces": [- "application/json"+ "text/css"],"tags": ["site"],- "summary": "get site robots information",+ "summary": "get site custom CSS","responses": {"200": {"description": "OK",@@ -8873,7 +8934,8 @@ const docTemplate = `{"active","hot","score",- "unanswered"+ "unanswered",+ "recommend"]},"page": {@@ -10833,8 +10895,8 @@ var SwaggerInfo = &swag.Spec{Host: "",BasePath: "= \"/\"",Schemes: []string{},- Title: "\"answer\"",- Description: "= \"answer api\"",+ Title: "\"apache answer\"",+ Description: "= \"apache answer api\"",InfoInstanceName: "swagger",SwaggerTemplate: docTemplate,LeftDelim: "{{",diff --git a/docs/swagger.json b/docs/swagger.jsonindex 7c103856..0b24c60c 100644--- a/docs/swagger.json+++ b/docs/swagger.json@@ -1,8 +1,8 @@{"swagger": "2.0","info": {- "description": "= \"answer api\"",- "title": "\"answer\"",+ "description": "= \"apache answer api\"",+ "title": "\"apache answer\"","contact": {},"version": "= \"v0.0.1\""},@@ -4159,6 +4159,67 @@}}},+ "/answer/api/v1/question/recommend/page": {+ "get": {+ "description": "get recommend questions by page",+ "consumes": [+ "application/json"+ ],+ "produces": [+ "application/json"+ ],+ "tags": [+ "Question"+ ],+ "summary": "get recommend questions by page",+ "parameters": [+ {+ "description": "QuestionPageReq",+ "name": "data",+ "in": "body",+ "required": true,+ "schema": {+ "$ref": "#/definitions/schema.QuestionPageReq"+ }+ }+ ],+ "responses": {+ "200": {+ "description": "OK",+ "schema": {+ "allOf": [+ {+ "$ref": "#/definitions/handler.RespBody"+ },+ {+ "type": "object",+ "properties": {+ "data": {+ "allOf": [+ {+ "$ref": "#/definitions/pager.PageModel"+ },+ {+ "type": "object",+ "properties": {+ "list": {+ "type": "array",+ "items": {+ "$ref": "#/definitions/schema.QuestionPageResp"+ }+ }+ }+ }+ ]+ }+ }+ }+ ]+ }+ }+ }+ }+ },"/answer/api/v1/question/recover": {"post": {"security": [@@ -6560,14 +6621,14 @@},"/custom.css": {"get": {- "description": "get site robots information",+ "description": "get site custom CSS","produces": [- "application/json"+ "text/css"],"tags": ["site"],- "summary": "get site robots information",+ "summary": "get site custom CSS","responses": {"200": {"description": "OK",@@ -8847,7 +8908,8 @@"active","hot","score",- "unanswered"+ "unanswered",+ "recommend"]},"page": {diff --git a/docs/swagger.yaml b/docs/swagger.yamlindex 88709bed..eabc45bb 100644--- a/docs/swagger.yaml+++ b/docs/swagger.yaml@@ -1416,6 +1416,7 @@ definitions:- hot- score- unanswered+ - recommendtype: stringpage:minimum: 1@@ -2757,8 +2758,8 @@ definitions:type: objectinfo:contact: {}- description: = "answer api"- title: '"answer"'+ description: = "apache answer api"+ title: '"apache answer"'version: = "v0.0.1"paths:/:@@ -5269,6 +5270,40 @@ paths:summary: get questions by pagetags:- Question+ /answer/api/v1/question/recommend/page:+ get:+ consumes:+ - application/json+ description: get recommend questions by page+ parameters:+ - description: QuestionPageReq+ in: body+ name: data+ required: true+ schema:+ $ref: '#/definitions/schema.QuestionPageReq'+ produces:+ - application/json+ responses:+ "200":+ description: OK+ schema:+ allOf:+ - $ref: '#/definitions/handler.RespBody'+ - properties:+ data:+ allOf:+ - $ref: '#/definitions/pager.PageModel'+ - properties:+ list:+ items:+ $ref: '#/definitions/schema.QuestionPageResp'+ type: array+ type: object+ type: object+ summary: get recommend questions by page+ tags:+ - Question/answer/api/v1/question/recover:post:consumes:@@ -6708,15 +6743,15 @@ paths:- Activity/custom.css:get:- description: get site robots information+ description: get site custom CSSproduces:- - application/json+ - text/cssresponses:"200":description: OKschema:type: string- summary: get site robots information+ summary: get site custom CSStags:- site/installation/base-info:diff --git a/go.mod b/go.modindex 8b886a09..e14b01b9 100644--- a/go.mod+++ b/go.mod@@ -79,7 +79,6 @@ require (github.com/cenkalti/backoff/v4 v4.2.1 // indirectgithub.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirectgithub.com/containerd/continuity v0.4.2 // indirect- github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirectgithub.com/davecgh/go-spew v1.1.1 // indirectgithub.com/docker/cli v24.0.6+incompatible // indirectgithub.com/docker/docker v24.0.6+incompatible // indirect@@ -129,7 +128,6 @@ require (github.com/pkg/errors v0.9.1 // indirectgithub.com/pmezard/go-difflib v1.0.0 // indirectgithub.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect- github.com/russross/blackfriday/v2 v2.1.0 // indirectgithub.com/sirupsen/logrus v1.9.3 // indirectgithub.com/spf13/afero v1.9.2 // indirectgithub.com/spf13/cast v1.5.0 // indirect@@ -142,7 +140,6 @@ require (github.com/tidwall/pretty v1.2.0 // indirectgithub.com/twitchyliquid64/golang-asm v0.15.1 // indirectgithub.com/ugorji/go/codec v1.2.11 // indirect- github.com/urfave/cli/v2 v2.3.0 // indirectgithub.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirectgithub.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirectgithub.com/xeipuuv/gojsonschema v1.2.0 // indirectdiff --git a/go.sum b/go.sumindex ead9468d..4bf5cc08 100644--- a/go.sum+++ b/go.sum@@ -128,7 +128,6 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=-github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=@@ -616,7 +615,6 @@ github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=-github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=@@ -692,8 +690,6 @@ github.com/swaggo/files v1.0.0/go.mod h1:N59U6URJLyU1PQgFqPM7wXLMhJx7QAolnvfQkqOgithub.com/swaggo/gin-swagger v1.5.3 h1:8mWmHLolIbrhJJTflsaFoZzRBYVmEE7JZGIq08EiC0Q=github.com/swaggo/gin-swagger v1.5.3/go.mod h1:3XJKSfHjDMB5dBo/0rrTXidPmgLeqsX89Yp4uA50HpI=github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=-github.com/swaggo/swag v1.16.1 h1:fTNRhKstPKxcnoKsytm4sahr8FaYzUcT7i1/3nd/fBg=-github.com/swaggo/swag v1.16.1/go.mod h1:9/LMvHycG3NFHfR6LwvikHv5iFvmPADQ359cKikGxto=github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg=github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk=github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=@@ -714,9 +710,7 @@ github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU=github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=-github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY=github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=-github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=