Skip to content

Fixed import order using goimports #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cmd/bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ 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"
"github.com/wagoodman/bashful/pkg/log"
"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
Expand Down
5 changes: 3 additions & 2 deletions pkg/config/assemble.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/assemble_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package config

import (
"bytes"
"github.com/spf13/afero"
"testing"

"github.com/spf13/afero"
)

func TestYamlInclude(t *testing.T) {
Expand Down
9 changes: 5 additions & 4 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
package config

import (
"github.com/deckarep/golang-set"
mapset "github.com/deckarep/golang-set"
)

type stringArray []string
Expand Down
3 changes: 2 additions & 1 deletion pkg/runtime/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 4 additions & 3 deletions pkg/runtime/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions pkg/runtime/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion pkg/runtime/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions pkg/runtime/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion pkg/runtime/executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package runtime

import (
"fmt"
"testing"

"github.com/lunixbochs/vtclean"
"github.com/wagoodman/bashful/pkg/config"
"testing"
)

// Test harness...
Expand Down
9 changes: 5 additions & 4 deletions pkg/runtime/handler/compressed_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion pkg/runtime/handler/simple_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions pkg/runtime/handler/task_logger.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
15 changes: 8 additions & 7 deletions pkg/runtime/handler/vertical_ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ 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"
"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"
"io"
"strconv"
"strings"
"sync"
"text/template"
"time"
terminaldimensions "github.com/wayneashleyberry/terminal-dimensions"
)

type VerticalUI struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/runtime/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
package runtime

import (
"github.com/wagoodman/bashful/utils"
"os"
"os/signal"
"syscall"

"github.com/wagoodman/bashful/utils"
)

func Setup() {
Expand Down
2 changes: 1 addition & 1 deletion pkg/runtime/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pkg/runtime/task_test.go
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions pkg/runtime/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ import (
"encoding/gob"
"errors"
"fmt"
"github.com/howeyc/gopass"
color "github.com/mgutz/ansi"
"io"
"net/url"
"os"
"os/exec"
"runtime"
"strings"
"time"

"github.com/howeyc/gopass"
color "github.com/mgutz/ansi"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion utils/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package utils

import (
"github.com/alecthomas/repr"
"testing"

"github.com/alecthomas/repr"
)

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