NewConfig returns a new empty Config.
()
| 129 | |
| 130 | // NewConfig returns a new empty Config. |
| 131 | func NewConfig() *Config { |
| 132 | config := &Config{ |
| 133 | Remotes: make(map[string]*RemoteConfig), |
| 134 | Submodules: make(map[string]*Submodule), |
| 135 | Branches: make(map[string]*Branch), |
| 136 | URLs: make(map[string]*URL), |
| 137 | Raw: format.New(), |
| 138 | } |
| 139 | |
| 140 | config.Pack.Window = DefaultPackWindow |
| 141 | |
| 142 | return config |
| 143 | } |
| 144 | |
| 145 | // ReadConfig reads a config file from a io.Reader. |
| 146 | func ReadConfig(r io.Reader) (*Config, error) { |
no outgoing calls