fix govet 'error' and disable .drone.yml quality linting
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Dan Ballard 2021-03-17 13:16:27 -07:00
parent 94792c5953
commit 68e60d438d
2 changed files with 5 additions and 5 deletions

View File

@ -14,8 +14,7 @@ steps:
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/torrc
- chmod a+x tor
- go get -u golang.org/x/lint/golint
- go mod vendor
- go install golang.org/x/lint/golint
- name: quality
image: golang
when:
@ -24,7 +23,8 @@ steps:
event: [ push, pull_request ]
commands:
- go list ./... | xargs go vet
- go list ./... | xargs golint -set_exit_status
- go list ./... | xargs golint
#Todo: fix all the lint errors and add `-set_exit_status` above to enforce linting
- name: buildLinux
image: openpriv/android-go-mobile:2021
when:
@ -60,4 +60,4 @@ steps:
event: pull_request
status: [ success, changed, failure ]
secrets: [gogs_account_token]
gogs_url: https://git.openprivacy.ca
gogs_url: https://git.openprivacy.ca

2
lib.go
View File

@ -59,7 +59,7 @@ func StartCwtch(appDir string, torPath string) {
log.Infof("making directory %v", appDir)
os.MkdirAll(path.Join(appDir, "/.tor", "tor"), 0700)
tor.NewTorrc().WithSocksPort(port).WithOnionTrafficOnly().WithControlPort(controlPort).WithHashedPassword(base64.StdEncoding.EncodeToString(key)).Build(filepath.Join(appDir, ".tor", "tor", "torrc"))
acn, err := tor.NewTorACNWithAuth(path.Join(appDir, "/.tor"), torPath, controlPort, tor.HashedPasswordAuthenticator{base64.StdEncoding.EncodeToString(key)})
acn, err := tor.NewTorACNWithAuth(path.Join(appDir, "/.tor"), torPath, controlPort, tor.HashedPasswordAuthenticator{Password: base64.StdEncoding.EncodeToString(key)})
if err != nil {
log.Errorf("\nError connecting to Tor: %v\n", err)
}