diff options
| author | davy wybiral <davy.wybiral@gmail.com> | 2019-08-08 05:08:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-08 05:08:29 -0500 |
| commit | f41f2b823aaacfa0173e566b5c1f96d63cb572bb (patch) | |
| tree | 2d67b0e3e6e12a2859f0d26b44c712a4df68b295 /pkg/app/tor.go | |
| parent | 81a52e33d1c0756a3d7e9f8fed3c3ba57800e458 (diff) | |
tor error msgs (#17)
Diffstat (limited to 'pkg/app/tor.go')
| -rw-r--r-- | pkg/app/tor.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/app/tor.go b/pkg/app/tor.go index 88f2db2..d06751f 100644 --- a/pkg/app/tor.go +++ b/pkg/app/tor.go @@ -1,6 +1,7 @@ package app import ( + "errors" "fmt" "os" @@ -17,7 +18,7 @@ func newTor(ct *TorConfig) (*tor, error) { addr := fmt.Sprintf("%s:%d", ct.Controller.Host, ct.Controller.Port) ctrl, err := torgo.NewController(addr) if err != nil { - return nil, err + return nil, errors.New("unable to connect to Tor controller") } if len(ct.Controller.Password) > 0 { err = ctrl.AuthenticatePassword(ct.Controller.Password) @@ -28,7 +29,7 @@ func newTor(ct *TorConfig) (*tor, error) { } } if err != nil { - return nil, err + return nil, errors.New("unable to authenticate to Tor controller") } key, err := onionkey.ReadFile("onion.key") if os.IsNotExist(err) { |
