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

Method LookupBool

config.go:143–158  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

141}
142
143func (c *Config) LookupBool(name string) (bool, error) {
144 var out C.int
145 cname := C.CString(name)
146 defer C.free(unsafe.Pointer(cname))
147
148 runtime.LockOSThread()
149 defer runtime.UnlockOSThread()
150
151 ret := C.git_config_get_bool(&out, c.ptr, cname)
152 runtime.KeepAlive(c)
153 if ret < 0 {
154 return false, MakeGitError(ret)
155 }
156
157 return out != 0, nil
158}
159
160func (c *Config) NewMultivarIterator(name, regexp string) (*ConfigIterator, error) {
161 cname := C.CString(name)

Callers 2

TestRepositorySetConfigFunction · 0.80
config_test.goFile · 0.80

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by 1

TestRepositorySetConfigFunction · 0.64