Skip to content

Commit

Permalink
build: use go 1.15 and update golangci-lint (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
jholdstock authored Dec 2, 2020
1 parent 3527cee commit 9437877
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 25 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.13, 1.14]
go: [1.14, 1.15]
steps:
- name: Set up Go
uses: actions/setup-go@v2
Expand All @@ -15,13 +15,9 @@ jobs:
- name: Check out source
uses: actions/checkout@v2
- name: Install Linters
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0"
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.33.0"
- name: Build
env:
GO111MODULE: "on"
run: go build ./...
- name: Test
env:
GO111MODULE: "on"
run: |
sh ./goclean.sh
./goclean.sh
2 changes: 1 addition & 1 deletion ratchet/ratchet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/companyzero/sntrup4591761"
"github.com/companyzero/zkc/blobshare"
"github.com/companyzero/zkc/ratchet/disk"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"golang.org/x/crypto/curve25519"
"golang.org/x/crypto/ed25519"
)
Expand Down
2 changes: 1 addition & 1 deletion session/kx.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"time"

"github.com/companyzero/sntrup4591761"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"golang.org/x/crypto/nacl/secretbox"
)

Expand Down
2 changes: 1 addition & 1 deletion tools/zkexport/zkexport.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/companyzero/zkc/zkserver/settings"
"github.com/companyzero/zkc/zkutil"
"github.com/davecgh/go-spew/spew"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
)

// fetchServerFullIdentity() fetches a server's signed identity data.
Expand Down
2 changes: 1 addition & 1 deletion tools/zkimport/zkimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/companyzero/zkc/tools"
"github.com/companyzero/zkc/zkserver/account"
"github.com/davecgh/go-spew/spew"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"github.com/vaughan0/go-ini"
)

Expand Down
5 changes: 2 additions & 3 deletions zkclient/acceptclientfingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ package main
import (
"bytes"
"crypto/rand"
"fmt"
"strings"

"github.com/companyzero/ttk"
"github.com/companyzero/zkc/blobshare"
"github.com/companyzero/zkc/ratchet"
"github.com/companyzero/zkc/rpc"
"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"github.com/nsf/termbox-go"
)

Expand Down Expand Up @@ -103,7 +102,7 @@ func (aw *acceptCFPWindow) Init(w *ttk.Window) {
//y++

y++
s := fmt.Sprintf("Are you sure you want to continue connecting (yes/no)?")
s := "Are you sure you want to continue connecting (yes/no)?"
w.AddLabel(ax, ay+y, s)
aw.questionInput = w.AddEdit(ax+len(s)+1, ay+y, -2, &aw.question)
}
Expand Down
2 changes: 1 addition & 1 deletion zkclient/addressbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/companyzero/zkc/rpc"
"github.com/companyzero/zkc/zkclient/addressbook"
"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
)

// addressBookDel permanently removes nick from the address book.
Expand Down
2 changes: 1 addition & 1 deletion zkclient/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"path"

"github.com/companyzero/zkc/rpc"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"github.com/marcopeereboom/goutil"
)

Expand Down
2 changes: 1 addition & 1 deletion zkclient/groupinvites.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/companyzero/zkc/rpc"
"github.com/companyzero/zkc/tools"
"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion zkclient/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/companyzero/zkc/ratchet"
"github.com/companyzero/zkc/ratchet/disk"
"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion zkclient/kxacceptwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/companyzero/zkc/blobshare"
"github.com/companyzero/zkc/rpc"
"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"github.com/nsf/termbox-go"
)

Expand Down
2 changes: 1 addition & 1 deletion zkclient/kxwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/companyzero/ttk"
"github.com/companyzero/zkc/blobshare"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"github.com/nsf/termbox-go"
)

Expand Down
2 changes: 1 addition & 1 deletion zkclient/welcome.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/companyzero/ttk"
"github.com/companyzero/zkc/rpc"
"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
"github.com/nsf/termbox-go"
)

Expand Down
2 changes: 1 addition & 1 deletion zkserver/account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/companyzero/zkc/zkidentity"
"github.com/davecgh/go-spew/spew"
"github.com/davecgh/go-xdr/xdr2"
xdr "github.com/davecgh/go-xdr/xdr2"
)

func newAccount(t *testing.T) (*Account, error) {
Expand Down
6 changes: 3 additions & 3 deletions zkserver/rendezvous.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ func (z *ZKS) handleRendezvousPull(writer chan *RPCWrapper,
// get token
v, err := rz.Get("", r.Token)
if err != nil {
payload.Error = fmt.Sprintf("invalid PIN")
payload.Error = "invalid PIN"
goto bad
}

// decode value
rzXDR, err = base64.StdEncoding.DecodeString(v)
if err != nil {
payload.Error = fmt.Sprintf("internal error base64decode")
payload.Error = "internal error base64decode"
goto bad
}
br = bytes.NewReader(rzXDR)
_, err = z.unmarshal(br, &rzRecord)
if err != nil {
payload.Error = fmt.Sprintf("internal error unmarshal")
payload.Error = "internal error unmarshal"
goto bad
}

Expand Down

0 comments on commit 9437877

Please sign in to comment.