Skip to content

Commit

Permalink
group local packages in import statement
Browse files Browse the repository at this point in the history
Pass "-local github.com/simplesurance" to goimports when it's run by
gometalinter and adapt the files accordingly.
This ensures that local packages are grouped together in the imports
list.
  • Loading branch information
fho committed Oct 15, 2018
1 parent 6282f45 commit 8599c76
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gometalinter.json
Expand Up @@ -11,5 +11,8 @@
"ineffassign",
"misspell",
"vet"
]
],
"Linters": {
"goimports": {"Command": "goimports -l -local github.com/simplesurance"}
}
}
1 change: 1 addition & 0 deletions build.go
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/pkg/errors"

"github.com/simplesurance/baur/log"
"github.com/simplesurance/baur/storage"
)
Expand Down
1 change: 0 additions & 1 deletion cfg/repository.go
Expand Up @@ -6,7 +6,6 @@ import (
"os"

"github.com/pelletier/go-toml"

"github.com/pkg/errors"

"github.com/simplesurance/baur/version"
Expand Down
3 changes: 2 additions & 1 deletion command/inputs.go
Expand Up @@ -7,11 +7,12 @@ import (
"strings"
"text/tabwriter"

"github.com/spf13/cobra"

"github.com/simplesurance/baur"
"github.com/simplesurance/baur/digest"
"github.com/simplesurance/baur/digest/sha384"
"github.com/simplesurance/baur/log"
"github.com/spf13/cobra"
)

var inputsShowDigest bool
Expand Down
3 changes: 2 additions & 1 deletion command/root.go
Expand Up @@ -6,9 +6,10 @@ import (
"path/filepath"
"runtime/pprof"

"github.com/spf13/cobra"

"github.com/simplesurance/baur/log"
"github.com/simplesurance/baur/version"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Expand Down
3 changes: 2 additions & 1 deletion command/verify.go
Expand Up @@ -6,10 +6,11 @@ import (
"strings"
"time"

"github.com/spf13/cobra"

"github.com/simplesurance/baur/log"
"github.com/simplesurance/baur/storage"
"github.com/simplesurance/baur/term"
"github.com/spf13/cobra"
)

const verifyLongHelp = `
Expand Down
1 change: 1 addition & 0 deletions digest/sha384/sha384.go
Expand Up @@ -10,6 +10,7 @@ import (
"sort"

"github.com/pkg/errors"

"github.com/simplesurance/baur/digest"
)

Expand Down
1 change: 1 addition & 0 deletions docker/docker.go
Expand Up @@ -12,6 +12,7 @@ import (
"docker.io/go-docker"
"docker.io/go-docker/api/types"
"github.com/pkg/errors"

"github.com/simplesurance/baur/log"
)

Expand Down
1 change: 1 addition & 0 deletions dockerartifact.go
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/pkg/errors"

"github.com/simplesurance/baur/digest"
"github.com/simplesurance/baur/fs"
"github.com/simplesurance/baur/upload"
Expand Down
1 change: 1 addition & 0 deletions dockerimg.go
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/pkg/errors"

"github.com/simplesurance/baur/digest"
)

Expand Down
1 change: 1 addition & 0 deletions exec/exec.go
Expand Up @@ -7,6 +7,7 @@ import (
"syscall"

"github.com/pkg/errors"

"github.com/simplesurance/baur/log"
)

Expand Down
1 change: 1 addition & 0 deletions repository.go
Expand Up @@ -7,6 +7,7 @@ import (
"path/filepath"

"github.com/pkg/errors"

"github.com/simplesurance/baur/cfg"
"github.com/simplesurance/baur/fs"
"github.com/simplesurance/baur/git"
Expand Down
1 change: 1 addition & 0 deletions s3/s3.go
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3/s3manager"

"github.com/simplesurance/baur/log"
)

Expand Down
1 change: 1 addition & 0 deletions storage/postgres/postgres_test.go
Expand Up @@ -7,6 +7,7 @@ import (
"time"

"github.com/rs/xid"

"github.com/simplesurance/baur/storage"
)

Expand Down
1 change: 1 addition & 0 deletions upload/seq/manager.go
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/pkg/errors"

"github.com/simplesurance/baur/log"
"github.com/simplesurance/baur/upload"
)
Expand Down

0 comments on commit 8599c76

Please sign in to comment.