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

Method SetInt64

config.go:260–274  ·  view source on GitHub ↗
(name string, value int64)

Source from the content-addressed store, hash-verified

258}
259
260func (c *Config) SetInt64(name string, value int64) (err error) {
261 cname := C.CString(name)
262 defer C.free(unsafe.Pointer(cname))
263
264 runtime.LockOSThread()
265 defer runtime.UnlockOSThread()
266
267 ret := C.git_config_set_int64(c.ptr, cname, C.int64_t(value))
268 runtime.KeepAlive(c)
269 if ret < 0 {
270 return MakeGitError(ret)
271 }
272
273 return nil
274}
275
276func (c *Config) SetBool(name string, value bool) (err error) {
277 cname := C.CString(name)

Callers 1

setupConfigFunction · 0.80

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by 1

setupConfigFunction · 0.64