LoadModelFromText loads the model from the text.
(text string)
| 171 | |
| 172 | // LoadModelFromText loads the model from the text. |
| 173 | func (model Model) LoadModelFromText(text string) error { |
| 174 | cfg, err := config.NewConfigFromText(text) |
| 175 | if err != nil { |
| 176 | return err |
| 177 | } |
| 178 | |
| 179 | return model.loadModelFromConfig(cfg) |
| 180 | } |
| 181 | |
| 182 | // loadModelFromConfig loads the model from a config interface. |
| 183 | // It loads all sections defined in sectionNameMap and validates that required sections are present. |