Skip to content

Commit

Permalink
Use goimports in place of the old golint
Browse files Browse the repository at this point in the history
  • Loading branch information
fformica committed May 23, 2024
1 parent 15fdbce commit 1bfb115
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 18 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ fmt:
test:
go fmt ./...
go vet ./...
goimports -w .
go test ./...

.PHONY: all fmt test
3 changes: 2 additions & 1 deletion mockns1/application.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package mockns1

import (
"gopkg.in/ns1/ns1-go.v2/rest/model/pulsar"
"net/http"

"gopkg.in/ns1/ns1-go.v2/rest/model/pulsar"
)

// AddApplicationTestCase sets up a test case for the api.Client.application.List()
Expand Down
3 changes: 2 additions & 1 deletion mockns1/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package mockns1

import (
"fmt"
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
"net/http"

"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
)

// AddZoneListTestCase sets up a test case for the api.Client.Versions.List()
Expand Down
3 changes: 2 additions & 1 deletion rest/_examples/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package main

import (
"fmt"
"gopkg.in/ns1/ns1-go.v2/rest/model/pulsar"
"log"
"net/http"
"os"
"strconv"
"time"

"gopkg.in/ns1/ns1-go.v2/rest/model/pulsar"

api "gopkg.in/ns1/ns1-go.v2/rest"
)

Expand Down
3 changes: 2 additions & 1 deletion rest/_examples/datasets.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ package main
import (
"encoding/json"
"fmt"
"gopkg.in/ns1/ns1-go.v2/rest/model/dataset"
"io"
"log"
"net/http"
"os"
"strings"
"time"

"gopkg.in/ns1/ns1-go.v2/rest/model/dataset"

api "gopkg.in/ns1/ns1-go.v2/rest"
)

Expand Down
5 changes: 3 additions & 2 deletions rest/dataset_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package rest_test

import (
"net/http"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/ns1/ns1-go.v2/mockns1"
api "gopkg.in/ns1/ns1-go.v2/rest"
"gopkg.in/ns1/ns1-go.v2/rest/model/dataset"
"net/http"
"testing"
)

func TestDatasetsService(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions rest/model/dataset/dataset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package dataset

import (
"encoding/json"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

var now = time.Unix(time.Now().Unix(), 0)
Expand Down
3 changes: 2 additions & 1 deletion rest/model/pulsar/application_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package pulsar

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/stretchr/testify/assert"
)

func TestNewBBPulsarApplication(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion rest/optiondef.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package rest
import (
"errors"
"fmt"
"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
"net/http"

"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
)

// OptionDefService handles the 'scope group' endpoints.
Expand Down
3 changes: 2 additions & 1 deletion rest/optiondef_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rest_test

import (
"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
"net/http"
"testing"

"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"

"gopkg.in/ns1/ns1-go.v2/mockns1"
api "gopkg.in/ns1/ns1-go.v2/rest"
)
Expand Down
3 changes: 2 additions & 1 deletion rest/reservation_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rest_test

import (
"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
"net/http"
"testing"

"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"

"gopkg.in/ns1/ns1-go.v2/mockns1"
api "gopkg.in/ns1/ns1-go.v2/rest"
)
Expand Down
3 changes: 2 additions & 1 deletion rest/scope_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rest_test

import (
"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
"net/http"
"testing"

"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"

"gopkg.in/ns1/ns1-go.v2/mockns1"
api "gopkg.in/ns1/ns1-go.v2/rest"
)
Expand Down
3 changes: 2 additions & 1 deletion rest/scopegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package rest
import (
"errors"
"fmt"
"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
"net/http"

"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
)

// ScopeGroupService handles the 'scope group' endpoints.
Expand Down
3 changes: 2 additions & 1 deletion rest/scopegroup_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package rest_test

import (
"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"
"net/http"
"testing"

"gopkg.in/ns1/ns1-go.v2/rest/model/dhcp"

"gopkg.in/ns1/ns1-go.v2/mockns1"
api "gopkg.in/ns1/ns1-go.v2/rest"
)
Expand Down
3 changes: 2 additions & 1 deletion rest/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package rest

import (
"fmt"
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
"net/http"

"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
)

// VersionsService handles 'zones/ZONE/versions' related endpoints.
Expand Down
5 changes: 3 additions & 2 deletions rest/version_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package rest_test

import (
"net/http"
"testing"

"github.com/stretchr/testify/require"
"gopkg.in/ns1/ns1-go.v2/mockns1"
api "gopkg.in/ns1/ns1-go.v2/rest"
"gopkg.in/ns1/ns1-go.v2/rest/model/dns"
"net/http"
"testing"
)

func TestVersion(t *testing.T) {
Expand Down

0 comments on commit 1bfb115

Please sign in to comment.