NewConfig returns a new empty Config.
()
| 139 | |
| 140 | // NewConfig returns a new empty Config. |
| 141 | func NewConfig() *Config { |
| 142 | config := &Config{ |
| 143 | Remotes: make(map[string]*RemoteConfig), |
| 144 | Submodules: make(map[string]*Submodule), |
| 145 | Branches: make(map[string]*Branch), |
| 146 | URLs: make(map[string]*URL), |
| 147 | Raw: format.New(), |
| 148 | } |
| 149 | |
| 150 | config.Pack.Window = DefaultPackWindow |
| 151 | |
| 152 | return config |
| 153 | } |
| 154 | |
| 155 | // ReadConfig reads a config file from a io.Reader. |
| 156 | func ReadConfig(r io.Reader) (*Config, error) { |
no outgoing calls
searching dependent graphs…