```
refactor(common): 移除未使用的XML解析测试代码 移除test_test.go中未完成的Mapxml函数和login/main.go中的 XML解析注释代码,清理无用的导入包,优化代码结构 BREAKING CHANGE: 删除了modules/config/model/map_moster_node.go 文件中的MapPit相关模型定义 ```
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/apcera/termtables"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
)
|
||||
|
||||
@@ -37,6 +38,12 @@ type Map struct {
|
||||
Galaxy string `xml:"galaxy,attr" json:"galaxy,omitempty"`
|
||||
}
|
||||
|
||||
func Mapxml() {
|
||||
|
||||
superMaps := &SuperMaps{}
|
||||
err := xml.Unmarshal([]byte(gfile.GetBytes("public/config/地图配置野怪.xml")), superMaps)
|
||||
fmt.Println(err)
|
||||
}
|
||||
func TestXml(t *testing.T) {
|
||||
// 示例XML数据
|
||||
xmlData := `<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
Reference in New Issue
Block a user