Browse Source

Run `go fmt`

Vadim Markovtsev 7 years ago
parent
commit
9cda4a93ee
4 changed files with 8 additions and 8 deletions
  1. 1 1
      identity_test.go
  2. 4 4
      pipeline.go
  3. 1 1
      pipeline_test.go
  4. 2 2
      renames.go

+ 1 - 1
identity_test.go

@@ -125,7 +125,7 @@ func TestIdentityDetectorRegistration(t *testing.T) {
 
 func TestIdentityDetectorConfigureEmpty(t *testing.T) {
 	id := IdentityDetector{}
-	assert.Panics(t, func() {id.Configure(map[string]interface{}{})})
+	assert.Panics(t, func() { id.Configure(map[string]interface{}{}) })
 }
 
 func TestIdentityDetectorConsume(t *testing.T) {

+ 4 - 4
pipeline.go

@@ -33,7 +33,7 @@ const (
 
 const (
 	ConfigPipelineDumpPath = "Pipeline.DumpPath"
-	ConfigPipelineDryRun = "Pipeline.DryRun"
+	ConfigPipelineDryRun   = "Pipeline.DryRun"
 )
 
 // ConfigurationOption allows for the unified, retrospective way to setup PipelineItem-s.
@@ -203,8 +203,8 @@ func (registry *PipelineItemRegistry) AddFlags() (map[string]interface{}, map[st
 		flags[ConfigPipelineDumpPath] = iface
 		iface = interface{}(true)
 		ptr2 := (**bool)(unsafe.Pointer(uintptr(unsafe.Pointer(&iface)) + unsafe.Sizeof(&iface)))
-		*ptr2 = flag.Bool("dry-run", false, "Do not run any analyses - only resolve the DAG. " +
-				"Useful for -dump-dag.")
+		*ptr2 = flag.Bool("dry-run", false, "Do not run any analyses - only resolve the DAG. "+
+			"Useful for -dump-dag.")
 		flags[ConfigPipelineDryRun] = iface
 	}
 	features := []string{}
@@ -413,7 +413,7 @@ func (pipeline *Pipeline) resolve(dumpPath string) {
 						fmt.Fprint(os.Stderr, item2.Name(), " [")
 						for i, key2 := range item2.Provides() {
 							fmt.Fprint(os.Stderr, key2)
-							if i < len(item.Provides()) - 1 {
+							if i < len(item.Provides())-1 {
 								fmt.Fprint(os.Stderr, ", ")
 							}
 						}

+ 1 - 1
pipeline_test.go

@@ -2,9 +2,9 @@ package hercules
 
 import (
 	"errors"
+	"flag"
 	"io"
 	"io/ioutil"
-	"flag"
 	"os"
 	"path"
 	"reflect"

+ 2 - 2
renames.go

@@ -186,11 +186,11 @@ func (ra *RenameAnalysis) sizesAreClose(size1 int64, size2 int64) bool {
 
 func (ra *RenameAnalysis) blobsAreClose(
 	blob1 *object.Blob, blob2 *object.Blob) (bool, error) {
-	str_from, err := blobToString(blob1)
+	str_from, err := BlobToString(blob1)
 	if err != nil {
 		return false, err
 	}
-	str_to, err := blobToString(blob2)
+	str_to, err := BlobToString(blob2)
 	if err != nil {
 		return false, err
 	}