Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fmt in ci #351

Merged
merged 5 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
uses: actions/setup-go@v2
with:
go-version: '1.14.6'
- name: go fmt
run: go fmt ./...
- name: goimports
run: go get golang.org/x/tools/cmd/goimports && goimports -d . | (! grep .)
- name: go vet
run: go vet ./...
- name: golangci-lint
Expand Down
9 changes: 3 additions & 6 deletions cmd/tink-cli/cmd/hardware/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@ import (
"log"
"os"

"github.com/tinkerbell/tink/pkg"

"github.com/tinkerbell/tink/protos/hardware"

"github.com/jedib0t/go-pretty/table"

"github.com/google/uuid"
"github.com/jedib0t/go-pretty/table"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/tinkerbell/tink/pkg"
"github.com/tinkerbell/tink/protos/hardware"
)

// SubCommands holds the sub commands for template command
Expand Down
3 changes: 1 addition & 2 deletions cmd/tink-cli/cmd/hardware/id.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ import (
"fmt"
"log"

"github.com/tinkerbell/tink/pkg"

"github.com/spf13/cobra"
"github.com/tinkerbell/tink/client"
"github.com/tinkerbell/tink/pkg"
"github.com/tinkerbell/tink/protos/hardware"
)

Expand Down
3 changes: 1 addition & 2 deletions cmd/tink-cli/cmd/hardware/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import (
"os"
"strings"

"github.com/tinkerbell/tink/pkg"

"github.com/spf13/cobra"
"github.com/tinkerbell/tink/client"
"github.com/tinkerbell/tink/pkg"
"github.com/tinkerbell/tink/protos/hardware"
)

Expand Down
3 changes: 1 addition & 2 deletions cmd/tink-cli/cmd/hardware/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import (
"log"
"sync"

"github.com/tinkerbell/tink/pkg"

"github.com/spf13/cobra"
"github.com/tinkerbell/tink/client"
"github.com/tinkerbell/tink/pkg"
"github.com/tinkerbell/tink/protos/hardware"
)

Expand Down
8 changes: 4 additions & 4 deletions db/migration/202010221010-add-unique-index.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package migration
import migrate "github.com/rubenv/sql-migrate"

func Get202010221010() *migrate.Migration {
return &migrate.Migration{
Id: "202010221010-add-unique-index",
Up: []string{`
return &migrate.Migration{
Id: "202010221010-add-unique-index",
Up: []string{`
CREATE UNIQUE INDEX IF NOT EXISTS uidx_workflow_worker_map ON workflow_worker_map (workflow_id, worker_id);
`},
}
}
}
1 change: 0 additions & 1 deletion grpc-server/tinkerbell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/packethost/pkg/log"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"

"github.com/tinkerbell/tink/db"
"github.com/tinkerbell/tink/db/mock"
"github.com/tinkerbell/tink/metrics"
Expand Down
6 changes: 2 additions & 4 deletions http-server/http_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ import (
tt "text/template"

"github.com/golang/protobuf/jsonpb" // nolint:staticcheck

"github.com/tinkerbell/tink/protos/template"
"github.com/tinkerbell/tink/protos/workflow"

"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"github.com/tinkerbell/tink/pkg"
"github.com/tinkerbell/tink/protos/hardware"
"github.com/tinkerbell/tink/protos/template"
"github.com/tinkerbell/tink/protos/workflow"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
12 changes: 4 additions & 8 deletions http-server/http_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ import (
"context"
"encoding/json"
"errors"

grpcRuntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/packethost/pkg/log"

"io/ioutil"
"net"
"net/http"
"net/http/httptest"
"os"
"strings"

"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"

"testing"

grpcRuntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/packethost/pkg/log"
"github.com/tinkerbell/tink/protos/hardware"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
)

const bufSize = 1024 * 1024
Expand Down
5 changes: 2 additions & 3 deletions http-server/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ import (
"runtime"
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

grpcRuntime "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/packethost/pkg/log"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus/promhttp"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)

var (
Expand Down
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mkShell {
git
gnumake
go
gotools
jq
nodePackages.prettier
pythonPackages.codespell
Expand Down