MCPcopy Create free account
hub / github.com/libgit2/git2go / NewIterator

Method NewIterator

config.go:188–200  ·  view source on GitHub ↗

NewIterator creates an iterator over each entry in the configuration

()

Source from the content-addressed store, hash-verified

186// NewIterator creates an iterator over each entry in the
187// configuration
188func (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

Callers

nothing calls this directly

Calls 1

MakeGitErrorFunction · 0.85

Tested by

no test coverage detected