Fix lint and format code in adapter/config dir
This commit is contained in:
parent
fb4c91fd76
commit
1db0588770
@ -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)
|
||||||
|
|||||||
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
@ -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"?>
|
||||||
|
|||||||
@ -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")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user