diff options
| author | lhchavez <[email protected]> | 2020-12-01 19:11:41 -0800 |
|---|---|---|
| committer | lhchavez <[email protected]> | 2021-09-05 18:52:01 -0700 |
| commit | 5def02a589a2c1653f4bb515fdec290361a222be (patch) | |
| tree | b99d3a8204c27c902f711bc4f8f8b48baa8352bb /clone_test.go | |
| parent | 70e5e419cf0cab31553b106267a0296f3cd672d9 (diff) | |
The big Callback type adjustment of 2020
This change makes all callbacks that can fail return an `error`. This
makes things a lot more idiomatic.
Diffstat (limited to 'clone_test.go')
| -rw-r--r-- | clone_test.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clone_test.go b/clone_test.go index acfbbcb..8814dd0 100644 --- a/clone_test.go +++ b/clone_test.go @@ -49,15 +49,9 @@ func TestCloneWithCallback(t *testing.T) { opts := CloneOptions{ Bare: true, - RemoteCreateCallback: func(r *Repository, name, url string) (*Remote, ErrorCode) { + RemoteCreateCallback: func(r *Repository, name, url string) (*Remote, error) { testPayload += 1 - - remote, err := r.Remotes.Create(REMOTENAME, url) - if err != nil { - return nil, ErrorCodeGeneric - } - - return remote, ErrorCodeOK + return r.Remotes.Create(REMOTENAME, url) }, } |
