From 1db058877095f70b649b57290e374ce24ff9f3ab Mon Sep 17 00:00:00 2001 From: loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Sat, 5 Jun 2021 11:14:50 +0800 Subject: [PATCH] Fix lint and format code in adapter/config dir --- CHANGELOG.md | 1 + adapter/config/config_test.go | 2 -- adapter/config/ini_test.go | 3 --- adapter/config/json_test.go | 2 -- adapter/config/xml/xml_test.go | 1 - adapter/config/yaml/yaml_test.go | 2 -- 6 files changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9eed8490..f9d4167f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # developing +- Fix lint and format code in adapter/config dir [4646](https://github.com/beego/beego/pull/4646) - Add http client and option func. [4455](https://github.com/beego/beego/issues/4455) - Add: Convenient way to generate mock object [4620](https://github.com/beego/beego/issues/4620) - Infra: use dependabot to update dependencies. [4623](https://github.com/beego/beego/pull/4623) diff --git a/adapter/config/config_test.go b/adapter/config/config_test.go index 15d6ffa6..86d3a2c5 100644 --- a/adapter/config/config_test.go +++ b/adapter/config/config_test.go @@ -20,7 +20,6 @@ import ( ) func TestExpandValueEnv(t *testing.T) { - testCases := []struct { item string want string @@ -51,5 +50,4 @@ func TestExpandValueEnv(t *testing.T) { t.Errorf("expand value error, item %q want %q, got %q", c.item, c.want, got) } } - } diff --git a/adapter/config/ini_test.go b/adapter/config/ini_test.go index 07992ba7..997d3f68 100644 --- a/adapter/config/ini_test.go +++ b/adapter/config/ini_test.go @@ -23,7 +23,6 @@ import ( ) func TestIni(t *testing.T) { - var ( inicontext = ` ;comment one @@ -129,11 +128,9 @@ password = ${GOPATH} if iniconf.String("name") != "astaxie" { t.Fatal("get name error") } - } func TestIniSave(t *testing.T) { - const ( inicontext = ` app = app diff --git a/adapter/config/json_test.go b/adapter/config/json_test.go index c73b5772..2f2c27c3 100644 --- a/adapter/config/json_test.go +++ b/adapter/config/json_test.go @@ -23,7 +23,6 @@ import ( ) func TestJsonStartsWithArray(t *testing.T) { - const jsoncontextwitharray = `[ { "url": "user", @@ -71,7 +70,6 @@ func TestJsonStartsWithArray(t *testing.T) { } func TestJson(t *testing.T) { - var ( jsoncontext = `{ "appname": "beeapi", diff --git a/adapter/config/xml/xml_test.go b/adapter/config/xml/xml_test.go index 95b21fd9..48424ef9 100644 --- a/adapter/config/xml/xml_test.go +++ b/adapter/config/xml/xml_test.go @@ -23,7 +23,6 @@ import ( ) func TestXML(t *testing.T) { - var ( // xml parse should incluce in tags xmlcontext = ` diff --git a/adapter/config/yaml/yaml_test.go b/adapter/config/yaml/yaml_test.go index 323b5e87..ac0245dd 100644 --- a/adapter/config/yaml/yaml_test.go +++ b/adapter/config/yaml/yaml_test.go @@ -23,7 +23,6 @@ import ( ) func TestYaml(t *testing.T) { - var ( yamlcontext = ` "appname": beeapi @@ -112,5 +111,4 @@ func TestYaml(t *testing.T) { if yamlconf.String("name") != "astaxie" { t.Fatal("get name error") } - }