diff --git a/cmd/bundle.go b/cmd/bundle.go index 7d899eb..defc37f 100644 --- a/cmd/bundle.go +++ b/cmd/bundle.go @@ -22,12 +22,13 @@ package cmd import ( "fmt" + "io/ioutil" + "path/filepath" + "github.com/spf13/cobra" "github.com/wagoodman/bashful/pkg/config" "github.com/wagoodman/bashful/pkg/runtime" "github.com/wagoodman/bashful/utils" - "io/ioutil" - "path/filepath" ) // bundleCmd represents the bundle command diff --git a/cmd/run.go b/cmd/run.go index 26ebee9..7261bac 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -22,7 +22,13 @@ package cmd import ( "fmt" - "github.com/deckarep/golang-set" + + mapset "github.com/deckarep/golang-set" + + "io/ioutil" + "math/rand" + "strings" + "time" "github.com/spf13/cobra" "github.com/wagoodman/bashful/pkg/config" @@ -30,10 +36,6 @@ import ( "github.com/wagoodman/bashful/pkg/runtime" "github.com/wagoodman/bashful/pkg/runtime/handler" "github.com/wagoodman/bashful/utils" - "io/ioutil" - "math/rand" - "strings" - "time" ) // todo: put these in a cli struct instance instead, then most logic can be in the cli struct diff --git a/pkg/config/assemble.go b/pkg/config/assemble.go index 4a3adc6..eff05d4 100644 --- a/pkg/config/assemble.go +++ b/pkg/config/assemble.go @@ -1,10 +1,11 @@ package config import ( - "github.com/spf13/afero" - "github.com/wagoodman/bashful/utils" "regexp" "strings" + + "github.com/spf13/afero" + "github.com/wagoodman/bashful/utils" ) type assembler struct { diff --git a/pkg/config/assemble_test.go b/pkg/config/assemble_test.go index 48064ea..634a77a 100644 --- a/pkg/config/assemble_test.go +++ b/pkg/config/assemble_test.go @@ -2,8 +2,9 @@ package config import ( "bytes" - "github.com/spf13/afero" "testing" + + "github.com/spf13/afero" ) func TestYamlInclude(t *testing.T) { diff --git a/pkg/config/config.go b/pkg/config/config.go index 9e9965f..6e017b5 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -22,13 +22,14 @@ package config import ( "fmt" - "github.com/deckarep/golang-set" - "github.com/spf13/afero" - "github.com/wagoodman/bashful/utils" - "gopkg.in/yaml.v2" "os" "path" "strings" + + mapset "github.com/deckarep/golang-set" + "github.com/spf13/afero" + "github.com/wagoodman/bashful/utils" + "gopkg.in/yaml.v2" ) var globalOptions *Options diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 74927d3..0dbe03e 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -1,9 +1,10 @@ package config import ( - "github.com/deckarep/golang-set" - "github.com/wagoodman/bashful/utils" "testing" + + mapset "github.com/deckarep/golang-set" + "github.com/wagoodman/bashful/utils" ) func Test_Compile_SingleTask(t *testing.T) { diff --git a/pkg/config/types.go b/pkg/config/types.go index dd476c8..ff0c604 100644 --- a/pkg/config/types.go +++ b/pkg/config/types.go @@ -21,7 +21,7 @@ package config import ( - "github.com/deckarep/golang-set" + mapset "github.com/deckarep/golang-set" ) type stringArray []string diff --git a/pkg/runtime/archive.go b/pkg/runtime/archive.go index 51f5a20..16a4625 100644 --- a/pkg/runtime/archive.go +++ b/pkg/runtime/archive.go @@ -24,11 +24,12 @@ import ( "archive/tar" "compress/gzip" "errors" - "github.com/wagoodman/bashful/utils" "io" "os" "path/filepath" "strings" + + "github.com/wagoodman/bashful/utils" ) type Archiver interface { diff --git a/pkg/runtime/client.go b/pkg/runtime/client.go index f268caa..d8b5949 100644 --- a/pkg/runtime/client.go +++ b/pkg/runtime/client.go @@ -23,14 +23,15 @@ package runtime import ( "bytes" "fmt" - "github.com/wagoodman/bashful/pkg/config" - "github.com/wagoodman/bashful/pkg/log" - "github.com/wagoodman/bashful/utils" "io" "os" "path/filepath" "strconv" "text/template" + + "github.com/wagoodman/bashful/pkg/config" + "github.com/wagoodman/bashful/pkg/log" + "github.com/wagoodman/bashful/utils" ) func NewClientFromYaml(yamlString []byte, cli *config.Cli) (*Client, error) { diff --git a/pkg/runtime/command.go b/pkg/runtime/command.go index 4c26d9d..3e800eb 100644 --- a/pkg/runtime/command.go +++ b/pkg/runtime/command.go @@ -2,13 +2,14 @@ package runtime import ( "bytes" - "github.com/wagoodman/bashful/pkg/config" - "github.com/wagoodman/bashful/utils" "os" "os/exec" "strings" "syscall" "time" + + "github.com/wagoodman/bashful/pkg/config" + "github.com/wagoodman/bashful/utils" ) func newCommand(taskConfig config.TaskConfig) command { diff --git a/pkg/runtime/downloader.go b/pkg/runtime/downloader.go index 3288564..873653a 100644 --- a/pkg/runtime/downloader.go +++ b/pkg/runtime/downloader.go @@ -22,12 +22,13 @@ package runtime import ( "fmt" - "github.com/deckarep/golang-set" "os" "path" "sync" "time" + mapset "github.com/deckarep/golang-set" + "github.com/cavaliercoder/grab" "github.com/dustin/go-humanize" "github.com/gosuri/uiprogress" diff --git a/pkg/runtime/executor.go b/pkg/runtime/executor.go index 2310bc4..f5456e7 100644 --- a/pkg/runtime/executor.go +++ b/pkg/runtime/executor.go @@ -22,11 +22,12 @@ package runtime import ( "fmt" + "os" + "time" + "github.com/wagoodman/bashful/pkg/config" "github.com/wagoodman/bashful/pkg/log" "github.com/wagoodman/bashful/utils" - "os" - "time" ) func newExecutorStats() *TaskStatistics { diff --git a/pkg/runtime/executor_test.go b/pkg/runtime/executor_test.go index c8d7b11..b19faac 100644 --- a/pkg/runtime/executor_test.go +++ b/pkg/runtime/executor_test.go @@ -2,9 +2,10 @@ package runtime import ( "fmt" + "testing" + "github.com/lunixbochs/vtclean" "github.com/wagoodman/bashful/pkg/config" - "testing" ) // Test harness... diff --git a/pkg/runtime/handler/compressed_ui.go b/pkg/runtime/handler/compressed_ui.go index 9e15091..83dd33a 100644 --- a/pkg/runtime/handler/compressed_ui.go +++ b/pkg/runtime/handler/compressed_ui.go @@ -2,16 +2,17 @@ package handler import ( "fmt" + "strconv" + "sync" + "time" + "github.com/google/uuid" color "github.com/mgutz/ansi" "github.com/wagoodman/bashful/pkg/config" "github.com/wagoodman/bashful/pkg/runtime" "github.com/wagoodman/bashful/utils" "github.com/wagoodman/jotframe" - "github.com/wayneashleyberry/terminal-dimensions" - "strconv" - "sync" - "time" + terminaldimensions "github.com/wayneashleyberry/terminal-dimensions" ) type cUiData struct { diff --git a/pkg/runtime/handler/simple_logger.go b/pkg/runtime/handler/simple_logger.go index 05604b6..bbb8ea9 100644 --- a/pkg/runtime/handler/simple_logger.go +++ b/pkg/runtime/handler/simple_logger.go @@ -2,9 +2,10 @@ package handler import ( "fmt" + "os" + "github.com/wagoodman/bashful/pkg/config" "github.com/wagoodman/bashful/pkg/runtime" - "os" ) // this was just a (successful) experiment :) needs to be reworked diff --git a/pkg/runtime/handler/task_logger.go b/pkg/runtime/handler/task_logger.go index 3193b19..854a012 100644 --- a/pkg/runtime/handler/task_logger.go +++ b/pkg/runtime/handler/task_logger.go @@ -1,15 +1,16 @@ package handler import ( + "io/ioutil" + "os" + "strconv" + "sync" + "github.com/google/uuid" "github.com/wagoodman/bashful/pkg/config" "github.com/wagoodman/bashful/pkg/log" "github.com/wagoodman/bashful/pkg/runtime" "github.com/wagoodman/bashful/utils" - "io/ioutil" - "os" - "strconv" - "sync" ) type bufferedLog struct { diff --git a/pkg/runtime/handler/vertical_ui.go b/pkg/runtime/handler/vertical_ui.go index cac385f..862112a 100644 --- a/pkg/runtime/handler/vertical_ui.go +++ b/pkg/runtime/handler/vertical_ui.go @@ -3,6 +3,13 @@ package handler import ( "bytes" "fmt" + "io" + "strconv" + "strings" + "sync" + "text/template" + "time" + "github.com/google/uuid" color "github.com/mgutz/ansi" "github.com/tj/go-spin" @@ -10,13 +17,7 @@ import ( "github.com/wagoodman/bashful/pkg/runtime" "github.com/wagoodman/bashful/utils" "github.com/wagoodman/jotframe" - "github.com/wayneashleyberry/terminal-dimensions" - "io" - "strconv" - "strings" - "sync" - "text/template" - "time" + terminaldimensions "github.com/wayneashleyberry/terminal-dimensions" ) type VerticalUI struct { diff --git a/pkg/runtime/root.go b/pkg/runtime/root.go index 1dfc218..b13400a 100644 --- a/pkg/runtime/root.go +++ b/pkg/runtime/root.go @@ -21,10 +21,11 @@ package runtime import ( - "github.com/wagoodman/bashful/utils" "os" "os/signal" "syscall" + + "github.com/wagoodman/bashful/utils" ) func Setup() { diff --git a/pkg/runtime/task.go b/pkg/runtime/task.go index 8bacf15..1498f15 100644 --- a/pkg/runtime/task.go +++ b/pkg/runtime/task.go @@ -36,7 +36,7 @@ import ( "github.com/lunixbochs/vtclean" "github.com/wagoodman/bashful/pkg/config" "github.com/wagoodman/bashful/utils" - "github.com/wayneashleyberry/terminal-dimensions" + terminaldimensions "github.com/wayneashleyberry/terminal-dimensions" ) // todo: remove these global vars diff --git a/pkg/runtime/task_test.go b/pkg/runtime/task_test.go index 92c3561..5613541 100644 --- a/pkg/runtime/task_test.go +++ b/pkg/runtime/task_test.go @@ -1,11 +1,12 @@ package runtime import ( - "github.com/lunixbochs/vtclean" - "github.com/wagoodman/bashful/pkg/config" "strings" "testing" "time" + + "github.com/lunixbochs/vtclean" + "github.com/wagoodman/bashful/pkg/config" ) func Test_Task_estimateRuntime(t *testing.T) { diff --git a/pkg/runtime/types.go b/pkg/runtime/types.go index d4e30cf..e28b2a7 100644 --- a/pkg/runtime/types.go +++ b/pkg/runtime/types.go @@ -22,12 +22,13 @@ package runtime import ( "bytes" - "github.com/google/uuid" - "github.com/wagoodman/bashful/pkg/config" "os" "os/exec" "sync" "time" + + "github.com/google/uuid" + "github.com/wagoodman/bashful/pkg/config" ) // EventHandler represents a type that can listen to Task events managed by the Executor diff --git a/utils/utils.go b/utils/utils.go index cbd578a..c298ed5 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -6,8 +6,6 @@ import ( "encoding/gob" "errors" "fmt" - "github.com/howeyc/gopass" - color "github.com/mgutz/ansi" "io" "net/url" "os" @@ -15,6 +13,9 @@ import ( "runtime" "strings" "time" + + "github.com/howeyc/gopass" + color "github.com/mgutz/ansi" ) var ( diff --git a/utils/utils_test.go b/utils/utils_test.go index f2192e9..c869bb6 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -1,8 +1,9 @@ package utils import ( - "github.com/alecthomas/repr" "testing" + + "github.com/alecthomas/repr" ) func TestMinMax(t *testing.T) {