Files

38 lines
963 B
Go
Raw Normal View History

2021-12-03 15:22:23 +08:00
package utils
import (
2021-12-07 16:10:12 +08:00
"SciencesServer/app/basic/config"
2021-12-03 15:22:23 +08:00
"fmt"
"testing"
)
type ManagePatent struct {
Kind string `json:"kind"`
Title string `json:"title"`
FileUrl string `json:"file_url"`
ApplyCode string `json:"apply_code"`
ApplyAt string `json:"apply_at"`
OpenCode string `json:"open_code"`
OpenAt string `json:"open_at"`
ApplyName string `json:"apply_name"`
ApplyAddress string `json:"apply_address"`
Inventor string `json:"inventor"`
Description string `json:"description"`
PrincipalClaim string `json:"principal_claim"`
IpcCode string `json:"ipc_code"`
}
func TestLoadConfig(t *testing.T) {
2021-12-07 16:10:12 +08:00
//file := "../file/manage_patent.json"
//out := make([]*ManagePatent, 0)
//LoadConfig(file, &out)
//fmt.Println(AnyToJSON(out))
2021-12-03 15:22:23 +08:00
2021-12-07 16:10:12 +08:00
file := "../file/sys_industry.json"
out := make([]*config.MemoryForIndustry, 0)
2021-12-03 15:22:23 +08:00
LoadConfig(file, &out)
fmt.Println(AnyToJSON(out))
}