(username string)
| 136 | } |
| 137 | |
| 138 | func NewCredentialUsername(username string) (*Credential, error) { |
| 139 | runtime.LockOSThread() |
| 140 | defer runtime.UnlockOSThread() |
| 141 | |
| 142 | cred := newCredential() |
| 143 | cusername := C.CString(username) |
| 144 | ret := C.git_credential_username_new(&cred.ptr, cusername) |
| 145 | if ret != 0 { |
| 146 | cred.Free() |
| 147 | return nil, MakeGitError(ret) |
| 148 | } |
| 149 | return cred, nil |
| 150 | } |
| 151 | |
| 152 | func NewCredentialUserpassPlaintext(username string, password string) (*Credential, error) { |
| 153 | runtime.LockOSThread() |
searching dependent graphs…