From a7fe09bb4c06c7111014ad360f13c178d3a2606e Mon Sep 17 00:00:00 2001 From: songshiyuan 00649746 Date: Sat, 16 Sep 2023 15:31:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BC=98=E5=85=88?= =?UTF-8?q?=E7=BA=A7=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- struct.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/struct.go b/struct.go index 10b8fe7..2fc76c1 100644 --- a/struct.go +++ b/struct.go @@ -16,35 +16,37 @@ package kie -//KVRequest is http request body +// KVRequest is http request body type KVRequest struct { ID string `json:"id" yaml:"id"` Key string `json:"key" yaml:"key"` Value string `json:"value,omitempty" yaml:"value,omitempty"` Status string `json:"status,omitempty" yaml:"status,omitempty"` ValueType string `json:"value_type,omitempty" bson:"value_type,omitempty" yaml:"value_type,omitempty"` //ini,json,text,yaml,properties + Priority int `json:"priority,omitempty" yaml:"priority,omitempty"` //the smaller value,the higher priority Checker string `json:"check,omitempty" yaml:"check,omitempty"` //python script Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` //redundant } -//KVResponse represents the key value list +// KVResponse represents the key value list type KVResponse struct { LabelDoc *LabelDocResponse `json:"label,omitempty"` Total int `json:"total,omitempty"` Data []*KVDoc `json:"data,omitempty"` } -//LabelDocResponse is label struct +// LabelDocResponse is label struct type LabelDocResponse struct { Labels map[string]string `json:"labels,omitempty"` } -//KVDoc is database struct to store kv +// KVDoc is database struct to store kv type KVDoc struct { ID string `json:"id,omitempty" bson:"id,omitempty" yaml:"id,omitempty" swag:"string"` Key string `json:"key" yaml:"key"` Value string `json:"value,omitempty" yaml:"value,omitempty"` ValueType string `json:"value_type,omitempty" bson:"value_type,omitempty" yaml:"value_type,omitempty"` //ini,json,text,yaml,properties + Priority int `json:"priority,omitempty" yaml:"priority,omitempty"` //the smaller value,the higher priority Checker string `json:"check,omitempty" yaml:"check,omitempty"` //python script CreateRevision int64 `json:"create_revision,omitempty" bson:"create_revision," yaml:"create_revision,omitempty"` UpdateRevision int64 `json:"update_revision,omitempty" bson:"update_revision," yaml:"update_revision,omitempty"` From 1c8a99e5dc3240e408252ef7cd231c7722e5406a Mon Sep 17 00:00:00 2001 From: songshiyuan 00649746 Date: Sat, 16 Sep 2023 16:24:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgolangci-lint=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=BF=87=E4=BD=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/golangci-lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index e51608f..83b56af 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -15,5 +15,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.48.0 - args: --skip-dirs=examples,test --skip-files=.*_test.go$ \ No newline at end of file + version: v1.51.2 + args: --enable gofmt,gocyclo,goimports,dupl,gosec --timeout 5m --skip-dirs=examples,test --skip-files=.*_test.go$ \ No newline at end of file From a48f8458828058e3a307ab0dbb8d4cf15dca4861 Mon Sep 17 00:00:00 2001 From: songshiyuan 00649746 Date: Sat, 16 Sep 2023 16:29:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgolangci-lint=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E8=BF=87=E4=BD=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 83b56af..f945ecb 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,4 +16,4 @@ jobs: uses: golangci/golangci-lint-action@v2 with: version: v1.51.2 - args: --enable gofmt,gocyclo,goimports,dupl,gosec --timeout 5m --skip-dirs=examples,test --skip-files=.*_test.go$ \ No newline at end of file + args: --skip-dirs=examples,test --skip-files=.*_test.go$ \ No newline at end of file