NewIterator creates an iterator over each entry in the configuration
()
| 186 | // NewIterator creates an iterator over each entry in the |
| 187 | // configuration |
| 188 | func (c *Config) NewIterator() (*ConfigIterator, error) { |
| 189 | iter := &ConfigIterator{cfg: c} |
| 190 | |
| 191 | runtime.LockOSThread() |
| 192 | defer runtime.UnlockOSThread() |
| 193 | |
| 194 | ret := C.git_config_iterator_new(&iter.ptr, c.ptr) |
| 195 | if ret < 0 { |
| 196 | return nil, MakeGitError(ret) |
| 197 | } |
| 198 | |
| 199 | return iter, nil |
| 200 | } |
| 201 | |
| 202 | // NewIteratorGlob creates an iterator over each entry in the |
| 203 | // configuration whose name matches the given regular expression |
nothing calls this directly
no test coverage detected