Merge pull request #4646 from Loyalsoldier/config-fix-lint

Fix lint and format code in adapter/config dir
This commit is contained in:
Ming Deng 2021-06-06 16:08:27 +08:00 committed by GitHub
commit 920ca80d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1 additions and 10 deletions

View File

@ -1,5 +1,6 @@
# developing # 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 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) - 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) - Infra: use dependabot to update dependencies. [4623](https://github.com/beego/beego/pull/4623)

View File

@ -20,7 +20,6 @@ import (
) )
func TestExpandValueEnv(t *testing.T) { func TestExpandValueEnv(t *testing.T) {
testCases := []struct { testCases := []struct {
item string item string
want 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) t.Errorf("expand value error, item %q want %q, got %q", c.item, c.want, got)
} }
} }
} }

View File

@ -23,7 +23,6 @@ import (
) )
func TestIni(t *testing.T) { func TestIni(t *testing.T) {
var ( var (
inicontext = ` inicontext = `
;comment one ;comment one
@ -129,11 +128,9 @@ password = ${GOPATH}
if iniconf.String("name") != "astaxie" { if iniconf.String("name") != "astaxie" {
t.Fatal("get name error") t.Fatal("get name error")
} }
} }
func TestIniSave(t *testing.T) { func TestIniSave(t *testing.T) {
const ( const (
inicontext = ` inicontext = `
app = app app = app

View File

@ -23,7 +23,6 @@ import (
) )
func TestJsonStartsWithArray(t *testing.T) { func TestJsonStartsWithArray(t *testing.T) {
const jsoncontextwitharray = `[ const jsoncontextwitharray = `[
{ {
"url": "user", "url": "user",
@ -71,7 +70,6 @@ func TestJsonStartsWithArray(t *testing.T) {
} }
func TestJson(t *testing.T) { func TestJson(t *testing.T) {
var ( var (
jsoncontext = `{ jsoncontext = `{
"appname": "beeapi", "appname": "beeapi",

View File

@ -23,7 +23,6 @@ import (
) )
func TestXML(t *testing.T) { func TestXML(t *testing.T) {
var ( var (
// xml parse should incluce in <config></config> tags // xml parse should incluce in <config></config> tags
xmlcontext = `<?xml version="1.0" encoding="UTF-8"?> xmlcontext = `<?xml version="1.0" encoding="UTF-8"?>

View File

@ -23,7 +23,6 @@ import (
) )
func TestYaml(t *testing.T) { func TestYaml(t *testing.T) {
var ( var (
yamlcontext = ` yamlcontext = `
"appname": beeapi "appname": beeapi
@ -112,5 +111,4 @@ func TestYaml(t *testing.T) {
if yamlconf.String("name") != "astaxie" { if yamlconf.String("name") != "astaxie" {
t.Fatal("get name error") t.Fatal("get name error")
} }
} }