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

Function RemoteNameIsValid

remote.go:596–609  ·  view source on GitHub ↗

RemoteNameIsValid returns whether the remote name is well-formed.

(name string)

Source from the content-addressed store, hash-verified

594
595// RemoteNameIsValid returns whether the remote name is well-formed.
596func RemoteNameIsValid(name string) (bool, error) {
597 cname := C.CString(name)
598 defer C.free(unsafe.Pointer(cname))
599
600 runtime.LockOSThread()
601 defer runtime.UnlockOSThread()
602
603 var valid C.int
604 ret := C.git_remote_name_is_valid(&valid, cname)
605 if ret < 0 {
606 return false, MakeGitError(ret)
607 }
608 return valid == 1, nil
609}
610
611// free releases the resources of the Remote.
612func (r *Remote) free() {

Callers 1

RemoteIsValidNameFunction · 0.85

Calls 2

MakeGitErrorFunction · 0.85
freeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…