Skip to content

Commit

Permalink
Remove artificial groupings in import blocks
Browse files Browse the repository at this point in the history
Fixed with:

sed -i '/^import (/,/^)/ { /^\s*$/ d}' **/*.go
goimports -w .
  • Loading branch information
mmlb committed Oct 19, 2020
1 parent 99a2844 commit 47c3e87
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 28 deletions.
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
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

0 comments on commit 47c3e87

Please sign in to comment.