NewModelFromFile creates a model from a .CONF file.
(path string)
| 137 | |
| 138 | // NewModelFromFile creates a model from a .CONF file. |
| 139 | func NewModelFromFile(path string) (Model, error) { |
| 140 | m := NewModel() |
| 141 | |
| 142 | err := m.LoadModel(path) |
| 143 | if err != nil { |
| 144 | return nil, err |
| 145 | } |
| 146 | |
| 147 | return m, nil |
| 148 | } |
| 149 | |
| 150 | // NewModelFromString creates a model from a string which contains model text. |
| 151 | func NewModelFromString(text string) (Model, error) { |
searching dependent graphs…