fix: word error

This commit is contained in:
chenrui 2021-08-31 15:23:11 +08:00
parent 8bfee444fd
commit bf815a310d
No known key found for this signature in database
GPG Key ID: E6C6812B87229952
2 changed files with 5 additions and 5 deletions

View File

@ -72,12 +72,12 @@ func (xc *Config) ParseData(data []byte) (config.Configer, error) {
v := d["config"]
if v == nil {
return nil, fmt.Errorf("xml parse should incluce in <config></config> tags")
return nil, fmt.Errorf("xml parse should include in <config></config> tags")
}
confVal, ok := v.(map[string]interface{})
if !ok {
return nil, fmt.Errorf("xml parse <config></config> tags should incluce sub tags")
return nil, fmt.Errorf("xml parse <config></config> tags should include sub tags")
}
x.data = config.ExpandValueEnvForMap(confVal)

View File

@ -26,7 +26,7 @@ import (
func TestXML(t *testing.T) {
var (
// xml parse should incluce in <config></config> tags
// xml parse should include in <config></config> tags
xmlcontext = `<?xml version="1.0" encoding="UTF-8"?>
<config>
<appname>beeapi</appname>
@ -158,7 +158,7 @@ func TestXMLMissConfig(t *testing.T) {
c := &Config{}
_, err := c.ParseData([]byte(xmlcontext1))
assert.Equal(t, "xml parse should incluce in <config></config> tags", err.Error())
assert.Equal(t, "xml parse should include in <config></config> tags", err.Error())
xmlcontext2 := `
<?xml version="1.0" encoding="UTF-8"?>
@ -166,7 +166,7 @@ func TestXMLMissConfig(t *testing.T) {
`
_, err = c.ParseData([]byte(xmlcontext2))
assert.Equal(t, "xml parse <config></config> tags should incluce sub tags", err.Error())
assert.Equal(t, "xml parse <config></config> tags should include sub tags", err.Error())
}
type Section struct {