From 4c850b598939536b2e09ed520e427e94d0026211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Mon, 13 Aug 2018 18:32:11 +0200 Subject: [PATCH] cleanup go imports --- bug/operation_pack.go | 1 + bug/person.go | 1 + commands/close.go | 1 + commands/commands.go | 1 + commands/comment.go | 1 + commands/label.go | 3 ++- commands/ls.go | 1 + commands/new.go | 1 + commands/open.go | 1 + commands/pull.go | 3 ++- commands/root.go | 3 ++- commands/show.go | 3 ++- commands/webui.go | 9 +++++---- graphql/resolvers/bug.go | 1 + graphql/resolvers/operations.go | 3 ++- graphql/resolvers/query.go | 1 + graphql/resolvers/repo.go | 1 + input/input.go | 5 +++-- repository/repo.go | 3 ++- repository/tree_entry.go | 3 ++- tests/bug_actions_test.go | 7 ++++--- 21 files changed, 37 insertions(+), 16 deletions(-) diff --git a/bug/operation_pack.go b/bug/operation_pack.go index 5de60bde05569690e6c3fa2bdec9d74ed182b372..307c01094a690191c97adfc3648054113f725880 100644 --- a/bug/operation_pack.go +++ b/bug/operation_pack.go @@ -3,6 +3,7 @@ package bug import ( "bytes" "encoding/gob" + "github.com/MichaelMure/git-bug/repository" "github.com/MichaelMure/git-bug/util" ) diff --git a/bug/person.go b/bug/person.go index 5c9dcc4c2e0380f4d316bc2ffb15b9847fe98cf8..674da9f26dc18f6b619d11f512bbaaeb2d1c913e 100644 --- a/bug/person.go +++ b/bug/person.go @@ -2,6 +2,7 @@ package bug import ( "errors" + "github.com/MichaelMure/git-bug/repository" ) diff --git a/commands/close.go b/commands/close.go index f57519ea07c8426dbdc5dfe6d4eac1fe74b00bfd..10420a4eb117249a6b72276553e640a73c2bb9a3 100644 --- a/commands/close.go +++ b/commands/close.go @@ -2,6 +2,7 @@ package commands import ( "errors" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/bug/operations" "github.com/spf13/cobra" diff --git a/commands/commands.go b/commands/commands.go index 0ab84717e2306a0466e9067d13e75cf0a09b01d1..51aa4e9a3fe74cbba424566f758ec28f48f0571d 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "github.com/spf13/cobra" ) diff --git a/commands/comment.go b/commands/comment.go index 0a76e4cef098a6007482977870c43ff7b598230f..97aa18aa9c9782832240ccdb78a3b62d4053a8e0 100644 --- a/commands/comment.go +++ b/commands/comment.go @@ -3,6 +3,7 @@ package commands import ( "errors" "fmt" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/bug/operations" "github.com/MichaelMure/git-bug/input" diff --git a/commands/label.go b/commands/label.go index ee6ed25f1ec374bb6ab17a4410269a77dbf7a80b..6c729ff55e6b60bd7f886d63066297b8671d6e23 100644 --- a/commands/label.go +++ b/commands/label.go @@ -2,10 +2,11 @@ package commands import ( "errors" + "os" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/bug/operations" "github.com/spf13/cobra" - "os" ) var labelRemove bool diff --git a/commands/ls.go b/commands/ls.go index 5a5d96c68a8e12c0126dc8c384fb3d14430a413e..30aa7bdcdc312f9d60cc885d39b7c31c7633a1c4 100644 --- a/commands/ls.go +++ b/commands/ls.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/util" "github.com/spf13/cobra" diff --git a/commands/new.go b/commands/new.go index a13e36bf5c95b4ee9cc5fb8b23421592bb2a7952..bd0966e521da253108b6bd9a667bdb5b4d1d94ad 100644 --- a/commands/new.go +++ b/commands/new.go @@ -2,6 +2,7 @@ package commands import ( "fmt" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/bug/operations" "github.com/MichaelMure/git-bug/input" diff --git a/commands/open.go b/commands/open.go index c99578cfe4469fe5a99f4dcdf7c84930e78a38b4..8a5ede3d867973b77d7fac4223127c71d887c9b0 100644 --- a/commands/open.go +++ b/commands/open.go @@ -2,6 +2,7 @@ package commands import ( "errors" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/bug/operations" "github.com/spf13/cobra" diff --git a/commands/pull.go b/commands/pull.go index 52b3ecd8ba6743cc0861d78ffa7c54fd2e684508..ff07912a5a9831b992ecfeb821160c0a9632d070 100644 --- a/commands/pull.go +++ b/commands/pull.go @@ -2,9 +2,10 @@ package commands import ( "errors" + "os" + "github.com/MichaelMure/git-bug/bug" "github.com/spf13/cobra" - "os" ) func runPull(cmd *cobra.Command, args []string) error { diff --git a/commands/root.go b/commands/root.go index df8d3d32e21228807a53b8d961946d7e1a0e5cce..ac2a75d878bfd7fa7aebf0d1a4cb56462382dcde 100644 --- a/commands/root.go +++ b/commands/root.go @@ -2,10 +2,11 @@ package commands import ( "fmt" + "os" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/repository" "github.com/spf13/cobra" - "os" ) // Will display "git bug" diff --git a/commands/show.go b/commands/show.go index 8cf3e34aa692d6425aeaa86c58fcc7401728d980..fe7581a78510fc8e4a57ed60aa53bb9a404dec27 100644 --- a/commands/show.go +++ b/commands/show.go @@ -3,10 +3,11 @@ package commands import ( "errors" "fmt" + "strings" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/util" "github.com/spf13/cobra" - "strings" ) func runShowBug(cmd *cobra.Command, args []string) error { diff --git a/commands/webui.go b/commands/webui.go index 0389d68b0e9703aebdee9f779a9ac0bc05271123..9ebced09059d041ff3157a5987a7b3d04d16911a 100644 --- a/commands/webui.go +++ b/commands/webui.go @@ -4,6 +4,11 @@ import ( "bytes" "encoding/json" "fmt" + "io/ioutil" + "log" + "net/http" + "time" + "github.com/MichaelMure/git-bug/graphql" "github.com/MichaelMure/git-bug/repository" "github.com/MichaelMure/git-bug/util" @@ -13,10 +18,6 @@ import ( "github.com/skratchdot/open-golang/open" "github.com/spf13/cobra" "github.com/vektah/gqlgen/handler" - "io/ioutil" - "log" - "net/http" - "time" ) var port int diff --git a/graphql/resolvers/bug.go b/graphql/resolvers/bug.go index 014a0f31b7922ad0b50390a4343978bdd05bc490..b33852438fb3041c174b4fc7858337da8b70061e 100644 --- a/graphql/resolvers/bug.go +++ b/graphql/resolvers/bug.go @@ -2,6 +2,7 @@ package resolvers import ( "context" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/graphql/connections" "github.com/MichaelMure/git-bug/graphql/models" diff --git a/graphql/resolvers/operations.go b/graphql/resolvers/operations.go index 086bc24968d793fa7a5a80cfe597e17aec6293c9..a0058a425ea473b20cb7933f6c832fc32c27205e 100644 --- a/graphql/resolvers/operations.go +++ b/graphql/resolvers/operations.go @@ -3,10 +3,11 @@ package resolvers import ( "context" "fmt" + "time" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/bug/operations" "github.com/MichaelMure/git-bug/graphql/models" - "time" ) type addCommentOperationResolver struct{} diff --git a/graphql/resolvers/query.go b/graphql/resolvers/query.go index bca4806fc3ad622722f7b2e41b602b74cceaface..4154964f286e7bfe9f7dfad5c2f7eea142219765 100644 --- a/graphql/resolvers/query.go +++ b/graphql/resolvers/query.go @@ -2,6 +2,7 @@ package resolvers import ( "context" + "github.com/MichaelMure/git-bug/cache" "github.com/MichaelMure/git-bug/graphql/models" ) diff --git a/graphql/resolvers/repo.go b/graphql/resolvers/repo.go index 388f28f53faacc233af7b6109f425e7fdb8147ba..5756a9ee9ea3e2e0ed2cd682cbd0a3ac74224766 100644 --- a/graphql/resolvers/repo.go +++ b/graphql/resolvers/repo.go @@ -2,6 +2,7 @@ package resolvers import ( "context" + "github.com/MichaelMure/git-bug/bug" "github.com/MichaelMure/git-bug/graphql/connections" "github.com/MichaelMure/git-bug/graphql/models" diff --git a/input/input.go b/input/input.go index 43fb96137f3736a7622c76a507befdae0a05a2ed..8e7f3d97b950408ba3b5eeffc0714afccf447d58 100644 --- a/input/input.go +++ b/input/input.go @@ -6,12 +6,13 @@ import ( "bufio" "bytes" "fmt" - "github.com/MichaelMure/git-bug/repository" - "github.com/pkg/errors" "io/ioutil" "os" "os/exec" "strings" + + "github.com/MichaelMure/git-bug/repository" + "github.com/pkg/errors" ) const messageFilename = "BUG_MESSAGE_EDITMSG" diff --git a/repository/repo.go b/repository/repo.go index 9ffb470e27081abae6c46bcf062ebff537403c8a..0c5734654532327e3e5be4d3d988b093b9000ca4 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -3,8 +3,9 @@ package repository import ( "bytes" - "github.com/MichaelMure/git-bug/util" "strings" + + "github.com/MichaelMure/git-bug/util" ) // Repo represents a source code repository. diff --git a/repository/tree_entry.go b/repository/tree_entry.go index 6716522c8036ce655995539e2e03f9c969b393a2..8b6b5e1b62b188d6f1d36ed010b6bc13304f9c70 100644 --- a/repository/tree_entry.go +++ b/repository/tree_entry.go @@ -2,8 +2,9 @@ package repository import ( "fmt" - "github.com/MichaelMure/git-bug/util" "strings" + + "github.com/MichaelMure/git-bug/util" ) type TreeEntry struct { diff --git a/tests/bug_actions_test.go b/tests/bug_actions_test.go index 96f1bc74222004b9811d4258b95340c70772ac17..57dcee817061b4f3835afbdcbbe7a56dc2173fc3 100644 --- a/tests/bug_actions_test.go +++ b/tests/bug_actions_test.go @@ -2,13 +2,14 @@ package tests import ( "fmt" - "github.com/MichaelMure/git-bug/bug" - "github.com/MichaelMure/git-bug/bug/operations" - "github.com/MichaelMure/git-bug/repository" "io/ioutil" "log" "os" "testing" + + "github.com/MichaelMure/git-bug/bug" + "github.com/MichaelMure/git-bug/bug/operations" + "github.com/MichaelMure/git-bug/repository" ) func createRepo(bare bool) *repository.GitRepo {