Skip to content

Commit

Permalink
Run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
lkysow committed Oct 18, 2017
1 parent 99e4f79 commit a20a5e7
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ release: ## Create packages for a release
./scripts/binary-release.sh

fmt: ## Run goimports (which also formats)
goimports -w $$(find . -type f -name '*.go' ! -path "./vendor/*" ! -path "./static/bindata_assetfs.go" ! -path "**/mocks/*")
goimports -w $$(find . -type f -name '*.go' ! -path "./vendor/*" ! -path "./server/static/bindata_assetfs.go" ! -path "**/mocks/*")

end-to-end-deps: ## Install e2e dependencies
./scripts/e2e-deps.sh
Expand Down
4 changes: 2 additions & 2 deletions server/command_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"strings"

"github.com/google/go-github/github"
"github.com/hootsuite/atlantis/server"
gh "github.com/hootsuite/atlantis/server/github/fixtures"
ghmocks "github.com/hootsuite/atlantis/server/github/mocks"
"github.com/hootsuite/atlantis/server/logging"
"github.com/hootsuite/atlantis/server/models/fixtures"
"github.com/hootsuite/atlantis/server"
"github.com/hootsuite/atlantis/server/mocks"
"github.com/hootsuite/atlantis/server/models/fixtures"
. "github.com/hootsuite/atlantis/testing_util"
"github.com/mohae/deepcopy"
. "github.com/petergtz/pegomock"
Expand Down
2 changes: 1 addition & 1 deletion server/event_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"

"github.com/google/go-github/github"
"github.com/hootsuite/atlantis/server"
. "github.com/hootsuite/atlantis/server/github/fixtures"
"github.com/hootsuite/atlantis/server/models"
"github.com/hootsuite/atlantis/server"
. "github.com/hootsuite/atlantis/testing_util"
"github.com/mohae/deepcopy"
)
Expand Down
9 changes: 5 additions & 4 deletions server/events_controller.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package server

import (
gh "github.com/google/go-github/github"
"net/http"
"io/ioutil"
"fmt"
"io/ioutil"
"net/http"

gh "github.com/google/go-github/github"
"github.com/hootsuite/atlantis/server/logging"
)

type EventsController struct{
type EventsController struct {
commandHandler *CommandHandler
pullClosedExecutor *PullClosedExecutor
logger *logging.SimpleLogger
Expand Down
2 changes: 1 addition & 1 deletion server/github_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"errors"
"strings"

"github.com/hootsuite/atlantis/server"
"github.com/hootsuite/atlantis/server/github/mocks"
"github.com/hootsuite/atlantis/server/models"
"github.com/hootsuite/atlantis/server"
. "github.com/hootsuite/atlantis/testing_util"
. "github.com/petergtz/pegomock"
)
Expand Down
2 changes: 1 addition & 1 deletion server/locking/boltdb/boltdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"time"

"github.com/hootsuite/atlantis/server/models"
"github.com/hootsuite/atlantis/server/locking/boltdb"
"github.com/hootsuite/atlantis/server/models"
)

var lockBucket = "bucket"
Expand Down
2 changes: 1 addition & 1 deletion server/locking/locking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"reflect"
"strings"

"github.com/hootsuite/atlantis/server/locking"
"github.com/hootsuite/atlantis/server/locking/mocks"
"github.com/hootsuite/atlantis/server/models"
. "github.com/hootsuite/atlantis/testing_util"
. "github.com/petergtz/pegomock"
"github.com/hootsuite/atlantis/server/locking"
)

var project = models.NewProject("owner/repo", "path")
Expand Down
4 changes: 2 additions & 2 deletions server/pull_closed_executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"reflect"
"testing"

"github.com/hootsuite/atlantis/server"
ghmocks "github.com/hootsuite/atlantis/server/github/mocks"
lockmocks "github.com/hootsuite/atlantis/server/locking/mocks"
"github.com/hootsuite/atlantis/server/mocks"
"github.com/hootsuite/atlantis/server/models"
"github.com/hootsuite/atlantis/server/models/fixtures"
"github.com/hootsuite/atlantis/server"
"github.com/hootsuite/atlantis/server/mocks"
. "github.com/hootsuite/atlantis/testing_util"
. "github.com/petergtz/pegomock"
)
Expand Down
32 changes: 16 additions & 16 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const (

// Server listens for GitHub events and runs the necessary Atlantis command
type Server struct {
router *mux.Router
port int
commandHandler *CommandHandler
logger *logging.SimpleLogger
eventParser *EventParser
locker locking.Locker
atlantisURL string
eventsController *EventsController
router *mux.Router
port int
commandHandler *CommandHandler
logger *logging.SimpleLogger
eventParser *EventParser
locker locking.Locker
atlantisURL string
eventsController *EventsController
}

// the mapstructure tags correspond to flags in cmd/server.go
Expand Down Expand Up @@ -147,14 +147,14 @@ func NewServer(config ServerConfig) (*Server, error) {
}
router := mux.NewRouter()
return &Server{
router: router,
port: config.Port,
commandHandler: commandHandler,
eventParser: eventParser,
logger: logger,
locker: lockingClient,
atlantisURL: config.AtlantisURL,
eventsController: eventsController,
router: router,
port: config.Port,
commandHandler: commandHandler,
eventParser: eventParser,
logger: logger,
locker: lockingClient,
atlantisURL: config.AtlantisURL,
eventsController: eventsController,
}, nil
}

Expand Down

0 comments on commit a20a5e7

Please sign in to comment.