func FindSystemConfig() string { var path [git_PATH_MAX]int8 cpath := (*C.char)(&path[0]) ecode := C.git_config_find_system(cpath, C.size_t(git_PATH_MAX)) if ecode != git_SUCCESS { return "" } return C.GoString(cpath) }
func ConfigFindSystem() (string, error) { var buf C.git_buf defer C.git_buf_free(&buf) runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_config_find_system(&buf) if ret < 0 { return "", MakeGitError(ret) } return C.GoString(buf.ptr), nil }