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

Method LookupInt64

config.go:107–122  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

105}
106
107func (c *Config) LookupInt64(name string) (int64, error) {
108 var out C.int64_t
109 cname := C.CString(name)
110 defer C.free(unsafe.Pointer(cname))
111
112 runtime.LockOSThread()
113 defer runtime.UnlockOSThread()
114
115 ret := C.git_config_get_int64(&out, c.ptr, cname)
116 runtime.KeepAlive(c)
117 if ret < 0 {
118 return 0, MakeGitError(ret)
119 }
120
121 return int64(out), nil
122}
123
124func (c *Config) LookupString(name string) (string, error) {
125 cname := C.CString(name)

Callers 1

config_test.goFile · 0.80

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected