From d2b276be15f676873238fc0b73af60e938bd5e76 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 18 Mar 2021 01:19:55 +0100 Subject: remove ugly on/off buttons --- pkg/vpn/bonafide/auth_sip.go | 3 +-- pkg/vpn/bonafide/bonafide.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg/vpn') diff --git a/pkg/vpn/bonafide/auth_sip.go b/pkg/vpn/bonafide/auth_sip.go index cc9d967..f44954e 100644 --- a/pkg/vpn/bonafide/auth_sip.go +++ b/pkg/vpn/bonafide/auth_sip.go @@ -52,9 +52,8 @@ func (a *sipAuthentication) getToken(user, password string) ([]byte, error) { log.Println("ERROR: failed auth request", err) if os.IsTimeout(err) { return nil, fmt.Errorf("TokenErrTimeout") - } else { - return nil, fmt.Errorf("TokenErrBadPost") } + return nil, fmt.Errorf("TokenErrBadPost") } defer resp.Body.Close() if resp.StatusCode != 200 { diff --git a/pkg/vpn/bonafide/bonafide.go b/pkg/vpn/bonafide/bonafide.go index 9dadc99..321b47f 100644 --- a/pkg/vpn/bonafide/bonafide.go +++ b/pkg/vpn/bonafide/bonafide.go @@ -141,7 +141,7 @@ func (b *Bonafide) GetPemCertificate() ([]byte, error) { /* try cached token */ token, err := b.auth.getToken("", "") if err != nil { - return nil, errors.New("BUG: This service needs login, but we were not logged in.") + return nil, errors.New("bug: this service needs login, but we were not logged in") } b.token = token } -- cgit v1.2.3