Run latest goimports

This commit is contained in:
Luke Kysow
2019-03-30 20:09:42 -05:00
parent a2c92e5977
commit 8982a67b78
46 changed files with 65 additions and 67 deletions

View File

@@ -15,18 +15,17 @@ package cmd
import (
"fmt"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
"net/url"
"os"
"path/filepath"
"strings"
"github.com/runatlantis/atlantis/server/logging"
"github.com/mitchellh/go-homedir"
homedir "github.com/mitchellh/go-homedir"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server"
"github.com/runatlantis/atlantis/server/events/vcs/bitbucketcloud"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
"github.com/runatlantis/atlantis/server/logging"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

View File

@@ -20,7 +20,7 @@ import (
"strings"
"testing"
"github.com/mitchellh/go-homedir"
homedir "github.com/mitchellh/go-homedir"
"github.com/runatlantis/atlantis/cmd"
"github.com/runatlantis/atlantis/server"
. "github.com/runatlantis/atlantis/testing"

View File

@@ -22,7 +22,7 @@ import (
"fmt"
"github.com/google/go-github/github"
"github.com/hashicorp/go-multierror"
multierror "github.com/hashicorp/go-multierror"
)
var defaultAtlantisURL = "http://localhost:4141"

View File

@@ -17,7 +17,7 @@ import (
"fmt"
"github.com/google/go-github/github"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/db"
"github.com/runatlantis/atlantis/server/events/models"

View File

@@ -21,7 +21,7 @@ import (
"regexp"
"strings"
"github.com/flynn-archive/go-shlex"
shlex "github.com/flynn-archive/go-shlex"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/events/yaml"
"github.com/spf13/pflag"

View File

@@ -20,12 +20,12 @@ import (
"strings"
"github.com/google/go-github/github"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/events/vcs/bitbucketcloud"
"github.com/runatlantis/atlantis/server/events/vcs/bitbucketserver"
"gopkg.in/go-playground/validator.v9"
validator "gopkg.in/go-playground/validator.v9"
)
const gitlabPullOpened = "opened"

View File

@@ -22,7 +22,7 @@ import (
"testing"
"github.com/google/go-github/github"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
"github.com/mohae/deepcopy"
"github.com/runatlantis/atlantis/server/events"
"github.com/runatlantis/atlantis/server/events/models"

View File

@@ -23,7 +23,7 @@ import (
"strings"
"time"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/logging"
"github.com/pkg/errors"

View File

@@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server/events/matchers"
"github.com/runatlantis/atlantis/server/events/models"

View File

@@ -11,7 +11,7 @@ import (
"github.com/pkg/errors"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/models"
)

View File

@@ -10,7 +10,7 @@ import (
"sync"
"testing"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
mocks2 "github.com/runatlantis/atlantis/server/events/mocks"
"github.com/runatlantis/atlantis/server/events/mocks/matchers"

View File

@@ -1,7 +1,7 @@
package runtime
import (
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/models"
)

View File

@@ -8,7 +8,7 @@ import (
"regexp"
"strings"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/models"
)

View File

@@ -8,10 +8,10 @@ import (
"strings"
"testing"
version "github.com/hashicorp/go-version"
mocks2 "github.com/runatlantis/atlantis/server/events/mocks"
"github.com/runatlantis/atlantis/server/events/terraform"
"github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/mocks/matchers"

View File

@@ -2,11 +2,12 @@ package runtime
import (
"fmt"
"github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/models"
"os"
"os/exec"
"path/filepath"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/models"
)
// RunStepRunner runs custom commands.

View File

@@ -4,7 +4,7 @@ import (
"strings"
"testing"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/events/runtime"
"github.com/runatlantis/atlantis/server/logging"

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"regexp"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/runatlantis/atlantis/server/events/terraform"
"github.com/runatlantis/atlantis/server/logging"

View File

@@ -27,9 +27,9 @@ import (
"strings"
"sync"
"github.com/hashicorp/go-getter"
"github.com/hashicorp/go-version"
"github.com/mitchellh/go-homedir"
getter "github.com/hashicorp/go-getter"
version "github.com/hashicorp/go-version"
homedir "github.com/mitchellh/go-homedir"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/logging"
)

View File

@@ -8,9 +8,8 @@ import (
"strings"
"testing"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/logging"
. "github.com/runatlantis/atlantis/testing"
)

View File

@@ -22,13 +22,12 @@ import (
"testing"
"time"
version "github.com/hashicorp/go-version"
"github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/cmd"
"github.com/runatlantis/atlantis/server/events/terraform/mocks"
"github.com/hashicorp/go-version"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/cmd"
"github.com/runatlantis/atlantis/server/events/terraform"
"github.com/runatlantis/atlantis/server/events/terraform/mocks"
. "github.com/runatlantis/atlantis/testing"
)

View File

@@ -10,7 +10,7 @@ import (
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/models"
"gopkg.in/go-playground/validator.v9"
validator "gopkg.in/go-playground/validator.v9"
)
type Client struct {

View File

@@ -15,7 +15,7 @@ import (
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/models"
"gopkg.in/go-playground/validator.v9"
validator "gopkg.in/go-playground/validator.v9"
)
// maxCommentLength is the maximum number of chars allowed by Bitbucket in a

View File

@@ -21,11 +21,11 @@ import (
"github.com/runatlantis/atlantis/server/events/vcs/common"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/logging"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
"github.com/runatlantis/atlantis/server/events/models"
)

View File

@@ -7,10 +7,10 @@ import (
"net/http/httptest"
"testing"
"github.com/lkysow/go-gitlab"
version "github.com/hashicorp/go-version"
gitlab "github.com/lkysow/go-gitlab"
"github.com/runatlantis/atlantis/server/events/models"
"github.com/hashicorp/go-version"
. "github.com/runatlantis/atlantis/testing"
)

View File

@@ -3,17 +3,17 @@ package yaml
import (
"encoding/json"
"fmt"
"github.com/flynn-archive/go-shlex"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/go-ozzo/ozzo-validation"
shlex "github.com/flynn-archive/go-shlex"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
// AtlantisYAMLFilename is the name of the config file for each repo.

View File

@@ -9,7 +9,7 @@ import (
"strings"
"testing"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/yaml"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"

View File

@@ -6,7 +6,7 @@ import (
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
func TestAutoPlan_UnmarshalYAML(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
)

View File

@@ -6,8 +6,8 @@ import (
"path/filepath"
"strings"
"github.com/go-ozzo/ozzo-validation"
"github.com/hashicorp/go-version"
validation "github.com/go-ozzo/ozzo-validation"
version "github.com/hashicorp/go-version"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
)

View File

@@ -3,12 +3,12 @@ package raw_test
import (
"testing"
"github.com/go-ozzo/ozzo-validation"
"github.com/hashicorp/go-version"
validation "github.com/go-ozzo/ozzo-validation"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
func TestProject_UnmarshalYAML(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package raw
import (
"errors"
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
)

View File

@@ -3,11 +3,11 @@ package raw_test
import (
"testing"
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
func TestConfig_UnmarshalYAML(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package raw
import (
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
)

View File

@@ -3,11 +3,11 @@ package raw_test
import (
"testing"
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
func TestStage_UnmarshalYAML(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"sort"
"strings"
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
)

View File

@@ -6,7 +6,7 @@ import (
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
func TestStepConfig_UnmarshalYAML(t *testing.T) {

View File

@@ -1,7 +1,7 @@
package raw
import (
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
)

View File

@@ -3,11 +3,11 @@ package raw_test
import (
"testing"
"github.com/go-ozzo/ozzo-validation"
validation "github.com/go-ozzo/ozzo-validation"
"github.com/runatlantis/atlantis/server/events/yaml/raw"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
. "github.com/runatlantis/atlantis/testing"
"gopkg.in/yaml.v2"
yaml "gopkg.in/yaml.v2"
)
func TestWorkflow_UnmarshalYAML(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"regexp"
"strings"
"github.com/hashicorp/go-version"
version "github.com/hashicorp/go-version"
"github.com/runatlantis/atlantis/server/logging"
)

View File

@@ -2,7 +2,7 @@
// after it's been parsed and validated.
package valid
import "github.com/hashicorp/go-version"
import version "github.com/hashicorp/go-version"
// RepoCfg is the atlantis.yaml config after it's been parsed and validated.
type RepoCfg struct {

View File

@@ -19,7 +19,7 @@ import (
"net/http"
"github.com/google/go-github/github"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events"
"github.com/runatlantis/atlantis/server/events/models"

View File

@@ -13,7 +13,7 @@ import (
"strings"
"testing"
"github.com/hashicorp/go-getter"
getter "github.com/hashicorp/go-getter"
"github.com/runatlantis/atlantis/server/events/db"
"github.com/runatlantis/atlantis/server/events/yaml/valid"

View File

@@ -24,7 +24,7 @@ import (
"strings"
"testing"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server"
"github.com/runatlantis/atlantis/server/events"

View File

@@ -19,7 +19,7 @@ import (
"io/ioutil"
"net/http"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
)
const secretHeader = "X-Gitlab-Token" // #nosec

View File

@@ -19,7 +19,7 @@ import (
"reflect"
"testing"
"github.com/lkysow/go-gitlab"
gitlab "github.com/lkysow/go-gitlab"
. "github.com/petergtz/pegomock"
"github.com/runatlantis/atlantis/server"
. "github.com/runatlantis/atlantis/testing"

View File

@@ -32,7 +32,7 @@ import (
"github.com/runatlantis/atlantis/server/events/db"
"github.com/runatlantis/atlantis/server/events/yaml/valid"
"github.com/elazarl/go-bindata-assetfs"
assetfs "github.com/elazarl/go-bindata-assetfs"
"github.com/gorilla/mux"
"github.com/pkg/errors"
"github.com/runatlantis/atlantis/server/events"