NewConfig create an empty configuration representation from file.
(confName string)
| 55 | |
| 56 | // NewConfig create an empty configuration representation from file. |
| 57 | func NewConfig(confName string) (ConfigInterface, error) { |
| 58 | c := &Config{ |
| 59 | data: make(map[string]map[string]string), |
| 60 | } |
| 61 | err := c.parse(confName) |
| 62 | return c, err |
| 63 | } |
| 64 | |
| 65 | // NewConfigFromText create an empty configuration representation from text. |
| 66 | func NewConfigFromText(text string) (ConfigInterface, error) { |