go_dreamfactory/cmd/v2/configure/structs/Tables.go
2022-12-27 17:48:35 +08:00

39 lines
966 B
Go

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type JsonLoader func(string) ([]map[string]interface{}, error)
type Tables struct {
TestFlow *GameTestFlow
TaskCond *GameTaskCond
}
func NewTables(loader JsonLoader) (*Tables, error) {
var err error
var buf []map[string]interface{}
tables := &Tables{}
if buf, err = loader("game_testflow"); err != nil {
return nil, err
}
if tables.TestFlow, err = NewGameTestFlow(buf); err != nil {
return nil, err
}
if buf, err = loader("game_taskcond"); err != nil {
return nil, err
}
if tables.TaskCond, err = NewGameTaskCond(buf); err != nil {
return nil, err
}
return tables, nil
}