NewIteratorGlob creates an iterator over each entry in the configuration whose name matches the given regular expression
(regexp string)
| 202 | // NewIteratorGlob creates an iterator over each entry in the |
| 203 | // configuration whose name matches the given regular expression |
| 204 | func (c *Config) NewIteratorGlob(regexp string) (*ConfigIterator, error) { |
| 205 | iter := &ConfigIterator{cfg: c} |
| 206 | cregexp := C.CString(regexp) |
| 207 | defer C.free(unsafe.Pointer(cregexp)) |
| 208 | |
| 209 | runtime.LockOSThread() |
| 210 | defer runtime.UnlockOSThread() |
| 211 | |
| 212 | ret := C.git_config_iterator_glob_new(&iter.ptr, c.ptr, cregexp) |
| 213 | if ret < 0 { |
| 214 | return nil, MakeGitError(ret) |
| 215 | } |
| 216 | |
| 217 | return iter, nil |
| 218 | } |
| 219 | |
| 220 | func (c *Config) SetString(name, value string) (err error) { |
| 221 | cname := C.CString(name) |
nothing calls this directly
no test coverage detected