feat(map): 更新地图配置和物品数据,优化XML文件结构
This commit is contained in:
20
common/data/xml/item/1_test.go
Normal file
20
common/data/xml/item/1_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package xml
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/ECUST-XX/xml"
|
||||
)
|
||||
|
||||
func Test_main(t *testing.T) {
|
||||
|
||||
// 解析XML到结构体
|
||||
var maps Items
|
||||
t1, _ := getItemsXML()
|
||||
xml.Unmarshal(t1, &maps)
|
||||
|
||||
//tf, _ := xml.MarshalIndentShortForm(tt, " ", " ")
|
||||
fmt.Println(maps)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user