diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-10-27 15:12:18 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-10-28 11:29:31 +0100 |
| commit | 668aa5dae1690d1a061da728f83b2450485d47f4 (patch) | |
| tree | 1f8172827cc8306888d6678ffd8ccd7b09e1b4fa /remote_test.go | |
| parent | 9c6db70fc2836b6f5eb56c505f9cc82461b999c3 (diff) | |
Make the constants have types
While Go will assign the correct type to a const block when it
auto-creates the values, assigning makes the const be typeless and will
only gain it in each particular use.
Make each constant in the blocks have an assigned type.
Diffstat (limited to 'remote_test.go')
| -rw-r--r-- | remote_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/remote_test.go b/remote_test.go index 6d81df4..631a6cd 100644 --- a/remote_test.go +++ b/remote_test.go @@ -46,7 +46,7 @@ func TestListRemotes(t *testing.T) { compareStringList(t, expected, actual) } -func assertHostname(cert *Certificate, valid bool, hostname string, t *testing.T) int { +func assertHostname(cert *Certificate, valid bool, hostname string, t *testing.T) ErrorCode { if hostname != "github.com" { t.Fatal("Hostname does not match") return ErrUser @@ -64,7 +64,7 @@ func TestCertificateCheck(t *testing.T) { checkFatal(t, err) callbacks := RemoteCallbacks{ - CertificateCheckCallback: func(cert *Certificate, valid bool, hostname string) int { + CertificateCheckCallback: func(cert *Certificate, valid bool, hostname string) ErrorCode { return assertHostname(cert, valid, hostname, t) }, } |
