Skip to content

Commit

Permalink
Fix format with go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hvihvi authored and apflieger committed Jan 8, 2017
1 parent bc4d55b commit fae2b87
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Expand Up @@ -3,9 +3,9 @@ package config
import (
"errors"
"flag"
"github.com/lesfurets/git-octopus/git"
"strconv"
"strings"
"github.com/lesfurets/git-octopus/git"
)

type OctopusConfig struct {
Expand Down
4 changes: 2 additions & 2 deletions config/config_test.go
@@ -1,10 +1,10 @@
package config

import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/lesfurets/git-octopus/git"
"github.com/lesfurets/git-octopus/test"
"github.com/stretchr/testify/assert"
"testing"
)

func createTestRepo() *git.Repository {
Expand Down
8 changes: 4 additions & 4 deletions functionnal_tests/basics_test.go
@@ -1,15 +1,15 @@
package functionnal_tests

import (
"testing"
"github.com/lesfurets/git-octopus/git"
"github.com/lesfurets/git-octopus/run"
"github.com/lesfurets/git-octopus/test"
"github.com/stretchr/testify/assert"
"io/ioutil"
"os"
"path/filepath"
"io/ioutil"
"strings"
"github.com/lesfurets/git-octopus/git"
"github.com/lesfurets/git-octopus/test"
"testing"
)

func TestVersion(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions functionnal_tests/edge_cases_test.go
@@ -1,10 +1,10 @@
package functionnal_tests

import (
"testing"
"github.com/lesfurets/git-octopus/run"
"github.com/stretchr/testify/assert"
"github.com/lesfurets/git-octopus/test"
"github.com/stretchr/testify/assert"
"testing"
)

func TestOctopusCommitConfigError(t *testing.T) {
Expand Down Expand Up @@ -76,7 +76,7 @@ func TestUncleanStateFail(t *testing.T) {

err := run.Run(context, "*")

if (assert.NotNil(t, err)) {
if assert.NotNil(t, err) {
assert.Contains(t, err.Error(), "The repository has to be clean.")
}
}
}
4 changes: 2 additions & 2 deletions functionnal_tests/no_commit_test.go
@@ -1,10 +1,10 @@
package functionnal_tests

import (
"testing"
"github.com/lesfurets/git-octopus/run"
"github.com/lesfurets/git-octopus/test"
"github.com/stretchr/testify/assert"
"testing"
)

func TestFastForward(t *testing.T) {
Expand Down Expand Up @@ -60,4 +60,4 @@ func TestConflictState(t *testing.T) {

status, _ := repo.Git("status", "--porcelain")
assert.Empty(t, status)
}
}
2 changes: 1 addition & 1 deletion run/matcher_test.go
@@ -1,9 +1,9 @@
package run

import (
"github.com/lesfurets/git-octopus/test"
"github.com/stretchr/testify/assert"
"testing"
"github.com/lesfurets/git-octopus/test"
)

func setupRepo() *OctopusContext {
Expand Down
11 changes: 5 additions & 6 deletions run/run.go
@@ -1,13 +1,13 @@
package run

import (
"github.com/lesfurets/git-octopus/git"
"log"
"bytes"
"errors"
"github.com/lesfurets/git-octopus/config"
"strings"
"bytes"
"github.com/lesfurets/git-octopus/git"
"github.com/lesfurets/git-octopus/test"
"log"
"strings"
)

type OctopusContext struct {
Expand Down Expand Up @@ -62,7 +62,7 @@ func Run(context *OctopusContext, args ...string) error {
// parents always contains HEAD. We need at lease 2 parents to create a merge commit
if octopusConfig.DoCommit && parents != nil && len(parents) > 1 {
tree, _ := context.Repo.Git("write-tree")
args := []string {"commit-tree"}
args := []string{"commit-tree"}
for _, parent := range parents {
args = append(args, "-p", parent)
}
Expand Down Expand Up @@ -144,7 +144,6 @@ func octopusCommitMessage(remotes map[string]string) string {
return "octopus commit"
}


func CreateTestContext() (*OctopusContext, *bytes.Buffer) {
dir := test.CreateTempDir()

Expand Down
4 changes: 2 additions & 2 deletions test/test_utils.go
@@ -1,8 +1,8 @@
package test

import (
"io/ioutil"
"github.com/lesfurets/git-octopus/git"
"io/ioutil"
"os"
)

Expand All @@ -13,4 +13,4 @@ func CreateTempDir() string {

func Cleanup(repo *git.Repository) error {
return os.RemoveAll(repo.Path)
}
}

0 comments on commit fae2b87

Please sign in to comment.