Run gofmt on compliance

Test: builds
Change-Id: I404b138faac0db9a92201be6163b19d9e6bff810
diff --git a/tools/compliance/cmd/bom_test.go b/tools/compliance/cmd/bom_test.go
index b0d61e1..9c12671 100644
--- a/tools/compliance/cmd/bom_test.go
+++ b/tools/compliance/cmd/bom_test.go
@@ -31,9 +31,9 @@
 		expectedOut []string
 	}{
 		{
-			condition: "firstparty",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "firstparty",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			stripPrefix: "out/target/product/fictional",
 			expectedOut: []string{
 				"/system/apex/highest.apex",
@@ -44,9 +44,9 @@
 			},
 		},
 		{
-			condition: "firstparty",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "firstparty",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			stripPrefix: "out/target/product/fictional/data/",
 			expectedOut: []string{
 				"container.zip",
@@ -57,23 +57,23 @@
 			},
 		},
 		{
-			condition: "firstparty",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "firstparty",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			stripPrefix: "out/target/product/fictional/bin/",
 			expectedOut: []string{"application"},
 		},
 		{
-			condition: "firstparty",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "firstparty",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"bin/bin1"},
 		},
 		{
-			condition: "firstparty",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "firstparty",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"lib/libd.so"},
 		},
@@ -102,27 +102,27 @@
 			},
 		},
 		{
-			condition: "notice",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "notice",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			expectedOut: []string{"out/target/product/fictional/bin/application"},
 		},
 		{
-			condition: "notice",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "notice",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			expectedOut: []string{"out/target/product/fictional/system/bin/bin1"},
 		},
 		{
-			condition: "notice",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "notice",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			expectedOut: []string{"out/target/product/fictional/system/lib/libd.so"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "reciprocal",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/apex/",
 			expectedOut: []string{
 				"highest.apex",
@@ -133,9 +133,9 @@
 			},
 		},
 		{
-			condition: "reciprocal",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "reciprocal",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			stripPrefix: "out/target/product/fictional/data/",
 			expectedOut: []string{
 				"container.zip",
@@ -146,30 +146,30 @@
 			},
 		},
 		{
-			condition: "reciprocal",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "reciprocal",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			stripPrefix: "out/target/product/fictional/bin/",
 			expectedOut: []string{"application"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "reciprocal",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"bin/bin1"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "reciprocal",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"lib/libd.so"},
 		},
 		{
-			condition: "restricted",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "restricted",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/apex/",
 			expectedOut: []string{
 				"highest.apex",
@@ -180,9 +180,9 @@
 			},
 		},
 		{
-			condition: "restricted",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "restricted",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			stripPrefix: "out/target/product/fictional/data/",
 			expectedOut: []string{
 				"container.zip",
@@ -193,30 +193,30 @@
 			},
 		},
 		{
-			condition: "restricted",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "restricted",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			stripPrefix: "out/target/product/fictional/bin/",
 			expectedOut: []string{"application"},
 		},
 		{
-			condition: "restricted",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "restricted",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"bin/bin1"},
 		},
 		{
-			condition: "restricted",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "restricted",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"lib/libd.so"},
 		},
 		{
-			condition: "proprietary",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "proprietary",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/apex/",
 			expectedOut: []string{
 				"highest.apex",
@@ -227,9 +227,9 @@
 			},
 		},
 		{
-			condition: "proprietary",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "proprietary",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			stripPrefix: "out/target/product/fictional/data/",
 			expectedOut: []string{
 				"container.zip",
@@ -240,23 +240,23 @@
 			},
 		},
 		{
-			condition: "proprietary",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "proprietary",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			stripPrefix: "out/target/product/fictional/bin/",
 			expectedOut: []string{"application"},
 		},
 		{
-			condition: "proprietary",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "proprietary",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"bin/bin1"},
 		},
 		{
-			condition: "proprietary",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "proprietary",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			stripPrefix: "out/target/product/fictional/system/",
 			expectedOut: []string{"lib/libd.so"},
 		},
diff --git a/tools/compliance/cmd/checkshare.go b/tools/compliance/cmd/checkshare.go
index 5114a28..e2735c3 100644
--- a/tools/compliance/cmd/checkshare.go
+++ b/tools/compliance/cmd/checkshare.go
@@ -46,12 +46,11 @@
 }
 
 var (
-	failConflicts = fmt.Errorf("conflicts")
+	failConflicts     = fmt.Errorf("conflicts")
 	failNoneRequested = fmt.Errorf("\nNo metadata files requested")
-	failNoLicenses = fmt.Errorf("No licenses")
+	failNoLicenses    = fmt.Errorf("No licenses")
 )
 
-
 // byError orders conflicts by error string
 type byError []compliance.SourceSharePrivacyConflict
 
diff --git a/tools/compliance/cmd/dumpgraph.go b/tools/compliance/cmd/dumpgraph.go
index 1ee63b2..76fdff3 100644
--- a/tools/compliance/cmd/dumpgraph.go
+++ b/tools/compliance/cmd/dumpgraph.go
@@ -31,7 +31,7 @@
 	stripPrefix     = flag.String("strip_prefix", "", "Prefix to remove from paths. i.e. path to root")
 
 	failNoneRequested = fmt.Errorf("\nNo license metadata files requested")
-	failNoLicenses = fmt.Errorf("No licenses found")
+	failNoLicenses    = fmt.Errorf("No licenses found")
 )
 
 type context struct {
diff --git a/tools/compliance/cmd/dumpresolutions.go b/tools/compliance/cmd/dumpresolutions.go
index 318cd91..fc8c47c 100644
--- a/tools/compliance/cmd/dumpresolutions.go
+++ b/tools/compliance/cmd/dumpresolutions.go
@@ -32,7 +32,7 @@
 	stripPrefix     = flag.String("strip_prefix", "", "Prefix to remove from paths. i.e. path to root")
 
 	failNoneRequested = fmt.Errorf("\nNo license metadata files requested")
-	failNoLicenses = fmt.Errorf("No licenses found")
+	failNoLicenses    = fmt.Errorf("No licenses found")
 )
 
 type context struct {
diff --git a/tools/compliance/cmd/dumpresolutions_test.go b/tools/compliance/cmd/dumpresolutions_test.go
index d904671..a3a298e 100644
--- a/tools/compliance/cmd/dumpresolutions_test.go
+++ b/tools/compliance/cmd/dumpresolutions_test.go
@@ -97,7 +97,7 @@
 			name:      "apex_trimmed_share",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesShared.AsList(),
+				conditions:  compliance.ImpliesShared.AsList(),
 				stripPrefix: "testdata/firstparty/",
 			},
 			expectedOut: []string{},
@@ -107,7 +107,7 @@
 			name:      "apex_trimmed_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesPrivate.AsList(),
+				conditions:  compliance.ImpliesPrivate.AsList(),
 				stripPrefix: "testdata/firstparty/",
 			},
 			expectedOut: []string{},
@@ -117,7 +117,7 @@
 			name:      "apex_trimmed_share_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions:  append(compliance.ImpliesPrivate.AsList(),compliance.ImpliesShared.AsList()...),
+				conditions:  append(compliance.ImpliesPrivate.AsList(), compliance.ImpliesShared.AsList()...),
 				stripPrefix: "testdata/firstparty/",
 			},
 			expectedOut: []string{},
@@ -255,7 +255,7 @@
 			name:      "apex_trimmed_share",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesShared.AsList(),
+				conditions:  compliance.ImpliesShared.AsList(),
 				stripPrefix: "testdata/notice/",
 			},
 			expectedOut: []string{},
@@ -265,7 +265,7 @@
 			name:      "apex_trimmed_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesPrivate.AsList(),
+				conditions:  compliance.ImpliesPrivate.AsList(),
 				stripPrefix: "testdata/notice/",
 			},
 			expectedOut: []string{},
@@ -275,7 +275,7 @@
 			name:      "apex_trimmed_share_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions:  append(compliance.ImpliesShared.AsList(),compliance.ImpliesPrivate.AsList()...),
+				conditions:  append(compliance.ImpliesShared.AsList(), compliance.ImpliesPrivate.AsList()...),
 				stripPrefix: "testdata/notice/",
 			},
 			expectedOut: []string{},
@@ -408,7 +408,7 @@
 			name:      "apex_trimmed_share",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesShared.AsList(),
+				conditions:  compliance.ImpliesShared.AsList(),
 				stripPrefix: "testdata/reciprocal/",
 			},
 			expectedOut: []string{
@@ -424,7 +424,7 @@
 			name:      "apex_trimmed_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesPrivate.AsList(),
+				conditions:  compliance.ImpliesPrivate.AsList(),
 				stripPrefix: "testdata/reciprocal/",
 			},
 			expectedOut: []string{},
@@ -434,7 +434,7 @@
 			name:      "apex_trimmed_share_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: append(compliance.ImpliesShared.AsList(),compliance.ImpliesPrivate.AsList()...),
+				conditions:  append(compliance.ImpliesShared.AsList(), compliance.ImpliesPrivate.AsList()...),
 				stripPrefix: "testdata/reciprocal/",
 			},
 			expectedOut: []string{
@@ -573,7 +573,7 @@
 			name:      "apex_trimmed_share",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesShared.AsList(),
+				conditions:  compliance.ImpliesShared.AsList(),
 				stripPrefix: "testdata/restricted/",
 			},
 			expectedOut: []string{
@@ -597,7 +597,7 @@
 			name:      "apex_trimmed_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesPrivate.AsList(),
+				conditions:  compliance.ImpliesPrivate.AsList(),
 				stripPrefix: "testdata/restricted/",
 			},
 			expectedOut: []string{},
@@ -607,7 +607,7 @@
 			name:      "apex_trimmed_share_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions:  append(compliance.ImpliesShared.AsList(),compliance.ImpliesPrivate.AsList()...),
+				conditions:  append(compliance.ImpliesShared.AsList(), compliance.ImpliesPrivate.AsList()...),
 				stripPrefix: "testdata/restricted/",
 			},
 			expectedOut: []string{
@@ -754,7 +754,7 @@
 			name:      "apex_trimmed_share",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesShared.AsList(),
+				conditions:  compliance.ImpliesShared.AsList(),
 				stripPrefix: "testdata/proprietary/",
 			},
 			expectedOut: []string{
@@ -771,7 +771,7 @@
 			name:      "apex_trimmed_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions: compliance.ImpliesPrivate.AsList(),
+				conditions:  compliance.ImpliesPrivate.AsList(),
 				stripPrefix: "testdata/proprietary/",
 			},
 			expectedOut: []string{
@@ -789,7 +789,7 @@
 			name:      "apex_trimmed_share_private",
 			roots:     []string{"highest.apex.meta_lic"},
 			ctx: context{
-				conditions:  append(compliance.ImpliesShared.AsList(),compliance.ImpliesPrivate.AsList()...),
+				conditions:  append(compliance.ImpliesShared.AsList(), compliance.ImpliesPrivate.AsList()...),
 				stripPrefix: "testdata/proprietary/",
 			},
 			expectedOut: []string{
@@ -930,7 +930,7 @@
 }
 
 // newTestCondition constructs a test license condition in the license graph.
-func newTestCondition(lg *compliance.LicenseGraph, conditionName... string) compliance.LicenseConditionSet {
+func newTestCondition(lg *compliance.LicenseGraph, conditionName ...string) compliance.LicenseConditionSet {
 	cs := compliance.NewLicenseConditionSet()
 	for _, name := range conditionName {
 		cs = cs.Plus(compliance.RecognizedConditionNames[name])
diff --git a/tools/compliance/cmd/listshare.go b/tools/compliance/cmd/listshare.go
index 5c58dc4..ae9382e 100644
--- a/tools/compliance/cmd/listshare.go
+++ b/tools/compliance/cmd/listshare.go
@@ -41,7 +41,7 @@
 
 var (
 	failNoneRequested = fmt.Errorf("\nNo license metadata files requested")
-	failNoLicenses = fmt.Errorf("No licenses found")
+	failNoLicenses    = fmt.Errorf("No licenses found")
 )
 
 func main() {
diff --git a/tools/compliance/cmd/shippedlibs.go b/tools/compliance/cmd/shippedlibs.go
index f25d729..290ced6 100644
--- a/tools/compliance/cmd/shippedlibs.go
+++ b/tools/compliance/cmd/shippedlibs.go
@@ -26,16 +26,16 @@
 )
 
 var (
-	outputFile  = flag.String("o", "-", "Where to write the library list. (default stdout)")
+	outputFile = flag.String("o", "-", "Where to write the library list. (default stdout)")
 
 	failNoneRequested = fmt.Errorf("\nNo license metadata files requested")
 	failNoLicenses    = fmt.Errorf("No licenses found")
 )
 
 type context struct {
-	stdout      io.Writer
-	stderr      io.Writer
-	rootFS      fs.FS
+	stdout io.Writer
+	stderr io.Writer
+	rootFS fs.FS
 }
 
 func init() {
diff --git a/tools/compliance/cmd/shippedlibs_test.go b/tools/compliance/cmd/shippedlibs_test.go
index 69ec817..4b2e4ee 100644
--- a/tools/compliance/cmd/shippedlibs_test.go
+++ b/tools/compliance/cmd/shippedlibs_test.go
@@ -30,153 +30,153 @@
 		expectedOut []string
 	}{
 		{
-			condition: "firstparty",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "firstparty",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			expectedOut: []string{"Android"},
 		},
 		{
-			condition: "firstparty",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "firstparty",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			expectedOut: []string{"Android"},
 		},
 		{
-			condition: "firstparty",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "firstparty",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			expectedOut: []string{"Android"},
 		},
 		{
-			condition: "firstparty",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "firstparty",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			expectedOut: []string{"Android"},
 		},
 		{
-			condition: "firstparty",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "firstparty",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			expectedOut: []string{"Android"},
 		},
 		{
-			condition: "notice",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "notice",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "notice",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "notice",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "notice",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "notice",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			expectedOut: []string{"Android", "Device"},
 		},
 		{
-			condition: "notice",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "notice",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "notice",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "notice",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			expectedOut: []string{"External"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "reciprocal",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "reciprocal",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "reciprocal",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			expectedOut: []string{"Android", "Device"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "reciprocal",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "reciprocal",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "reciprocal",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			expectedOut: []string{"External"},
 		},
 		{
-			condition: "restricted",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "restricted",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "restricted",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "restricted",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "restricted",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "restricted",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			expectedOut: []string{"Android", "Device"},
 		},
 		{
-			condition: "restricted",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "restricted",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "restricted",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "restricted",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			expectedOut: []string{"External"},
 		},
 		{
-			condition: "proprietary",
-			name:      "apex",
-			roots:     []string{"highest.apex.meta_lic"},
+			condition:   "proprietary",
+			name:        "apex",
+			roots:       []string{"highest.apex.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "proprietary",
-			name:      "container",
-			roots:     []string{"container.zip.meta_lic"},
+			condition:   "proprietary",
+			name:        "container",
+			roots:       []string{"container.zip.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "proprietary",
-			name:      "application",
-			roots:     []string{"application.meta_lic"},
+			condition:   "proprietary",
+			name:        "application",
+			roots:       []string{"application.meta_lic"},
 			expectedOut: []string{"Android", "Device"},
 		},
 		{
-			condition: "proprietary",
-			name:      "binary",
-			roots:     []string{"bin/bin1.meta_lic"},
+			condition:   "proprietary",
+			name:        "binary",
+			roots:       []string{"bin/bin1.meta_lic"},
 			expectedOut: []string{"Android", "Device", "External"},
 		},
 		{
-			condition: "proprietary",
-			name:      "library",
-			roots:     []string{"lib/libd.so.meta_lic"},
+			condition:   "proprietary",
+			name:        "library",
+			roots:       []string{"lib/libd.so.meta_lic"},
 			expectedOut: []string{"External"},
 		},
 	}
diff --git a/tools/compliance/condition.go b/tools/compliance/condition.go
index 26b91ca..cfe6f82 100644
--- a/tools/compliance/condition.go
+++ b/tools/compliance/condition.go
@@ -61,16 +61,16 @@
 var (
 	// RecognizedConditionNames maps condition strings to LicenseCondition.
 	RecognizedConditionNames = map[string]LicenseCondition{
-		"unencumbered": UnencumberedCondition,
-		"permissive": PermissiveCondition,
-		"notice": NoticeCondition,
-		"reciprocal": ReciprocalCondition,
-		"restricted": RestrictedCondition,
+		"unencumbered":                        UnencumberedCondition,
+		"permissive":                          PermissiveCondition,
+		"notice":                              NoticeCondition,
+		"reciprocal":                          ReciprocalCondition,
+		"restricted":                          RestrictedCondition,
 		"restricted_with_classpath_exception": RestrictedClasspathExceptionCondition,
-		"restricted_allows_dynamic_linking": WeaklyRestrictedCondition,
-		"proprietary": ProprietaryCondition,
-		"by_exception_only": ByExceptionOnlyCondition,
-		"not_allowed": NotAllowedCondition,
+		"restricted_allows_dynamic_linking":   WeaklyRestrictedCondition,
+		"proprietary":                         ProprietaryCondition,
+		"by_exception_only":                   ByExceptionOnlyCondition,
+		"not_allowed":                         NotAllowedCondition,
 	}
 )
 
diff --git a/tools/compliance/conditionset_test.go b/tools/compliance/conditionset_test.go
index c7306e7..1d80676 100644
--- a/tools/compliance/conditionset_test.go
+++ b/tools/compliance/conditionset_test.go
@@ -33,82 +33,82 @@
 			conditions: []string{},
 			plus:       &[]string{},
 			matchingAny: map[string][]string{
-				"notice":     []string{},
-				"restricted": []string{},
+				"notice":                []string{},
+				"restricted":            []string{},
 				"restricted|reciprocal": []string{},
 			},
-			expected:   []string{},
+			expected: []string{},
 		},
 		{
 			name:       "emptyminusnothing",
 			conditions: []string{},
 			minus:      &[]string{},
 			matchingAny: map[string][]string{
-				"notice":     []string{},
-				"restricted": []string{},
+				"notice":                []string{},
+				"restricted":            []string{},
 				"restricted|reciprocal": []string{},
 			},
-			expected:   []string{},
+			expected: []string{},
 		},
 		{
 			name:       "emptyminusnotice",
 			conditions: []string{},
 			minus:      &[]string{"notice"},
 			matchingAny: map[string][]string{
-				"notice":     []string{},
-				"restricted": []string{},
+				"notice":                []string{},
+				"restricted":            []string{},
 				"restricted|reciprocal": []string{},
 			},
-			expected:   []string{},
+			expected: []string{},
 		},
 		{
-			name: "noticeonly",
+			name:       "noticeonly",
 			conditions: []string{"notice"},
 			matchingAny: map[string][]string{
-				"notice":     []string{"notice"},
-				"notice|proprietary":     []string{"notice"},
-				"restricted": []string{},
+				"notice":             []string{"notice"},
+				"notice|proprietary": []string{"notice"},
+				"restricted":         []string{},
 			},
 			expected: []string{"notice"},
 		},
 		{
-			name: "allnoticeonly",
+			name:       "allnoticeonly",
 			conditions: []string{"notice"},
-			plus: &[]string{"notice"},
+			plus:       &[]string{"notice"},
 			matchingAny: map[string][]string{
-				"notice":     []string{"notice"},
-				"notice|proprietary":     []string{"notice"},
-				"restricted": []string{},
+				"notice":             []string{"notice"},
+				"notice|proprietary": []string{"notice"},
+				"restricted":         []string{},
 			},
 			expected: []string{"notice"},
 		},
 		{
-			name: "emptyplusnotice",
+			name:       "emptyplusnotice",
 			conditions: []string{},
-			plus: &[]string{"notice"},
+			plus:       &[]string{"notice"},
 			matchingAny: map[string][]string{
-				"notice":     []string{"notice"},
-				"notice|proprietary":     []string{"notice"},
-				"restricted": []string{},
+				"notice":             []string{"notice"},
+				"notice|proprietary": []string{"notice"},
+				"restricted":         []string{},
 			},
 			expected: []string{"notice"},
 		},
 		{
-			name: "everything",
+			name:       "everything",
 			conditions: []string{"unencumbered", "permissive", "notice", "reciprocal", "restricted", "proprietary"},
-			plus: &[]string{"restricted_with_classpath_exception", "restricted_allows_dynamic_linking", "by_exception_only", "not_allowed"},
+			plus:       &[]string{"restricted_with_classpath_exception", "restricted_allows_dynamic_linking", "by_exception_only", "not_allowed"},
 			matchingAny: map[string][]string{
-				"unencumbered": []string{"unencumbered"},
-				"permissive":       []string{"permissive"},
-				"notice":     []string{"notice"},
-				"reciprocal":     []string{"reciprocal"},
-				"restricted":     []string{"restricted"},
-				"restricted_with_classpath_exception":     []string{"restricted_with_classpath_exception"},
-				"restricted_allows_dynamic_linking":     []string{"restricted_allows_dynamic_linking"},
-				"proprietary":     []string{"proprietary"},
-				"by_exception_only":     []string{"by_exception_only"},
-				"not_allowed":     []string{"not_allowed"},
-				"notice|proprietary":     []string{"notice", "proprietary"},
+				"unencumbered":                        []string{"unencumbered"},
+				"permissive":                          []string{"permissive"},
+				"notice":                              []string{"notice"},
+				"reciprocal":                          []string{"reciprocal"},
+				"restricted":                          []string{"restricted"},
+				"restricted_with_classpath_exception": []string{"restricted_with_classpath_exception"},
+				"restricted_allows_dynamic_linking":   []string{"restricted_allows_dynamic_linking"},
+				"proprietary":                         []string{"proprietary"},
+				"by_exception_only":                   []string{"by_exception_only"},
+				"not_allowed":                         []string{"not_allowed"},
+				"notice|proprietary":                  []string{"notice", "proprietary"},
 			},
 			expected: []string{
 				"unencumbered",
@@ -137,13 +137,13 @@
 				"by_exception_only",
 				"not_allowed",
 			},
-			plus: &[]string{},
+			plus:  &[]string{},
 			minus: &[]string{},
 			matchingAny: map[string][]string{
 				"unencumbered|permissive|notice": []string{"unencumbered", "permissive", "notice"},
-				"restricted|reciprocal":     []string{"reciprocal", "restricted"},
-				"proprietary|by_exception_only":     []string{"proprietary", "by_exception_only"},
-				"not_allowed":     []string{"not_allowed"},
+				"restricted|reciprocal":          []string{"reciprocal", "restricted"},
+				"proprietary|by_exception_only":  []string{"proprietary", "by_exception_only"},
+				"not_allowed":                    []string{"not_allowed"},
 			},
 			expected: []string{
 				"unencumbered",
@@ -159,21 +159,21 @@
 			},
 		},
 		{
-			name: "allbutone",
+			name:       "allbutone",
 			conditions: []string{"unencumbered", "permissive", "notice", "reciprocal", "restricted", "proprietary"},
-			plus: &[]string{"restricted_allows_dynamic_linking", "by_exception_only", "not_allowed"},
+			plus:       &[]string{"restricted_allows_dynamic_linking", "by_exception_only", "not_allowed"},
 			matchingAny: map[string][]string{
-				"unencumbered": []string{"unencumbered"},
-				"permissive":       []string{"permissive"},
-				"notice":     []string{"notice"},
-				"reciprocal":     []string{"reciprocal"},
-				"restricted":     []string{"restricted"},
-				"restricted_with_classpath_exception":     []string{},
-				"restricted_allows_dynamic_linking":     []string{"restricted_allows_dynamic_linking"},
-				"proprietary":     []string{"proprietary"},
-				"by_exception_only":     []string{"by_exception_only"},
-				"not_allowed":     []string{"not_allowed"},
-				"notice|proprietary":     []string{"notice", "proprietary"},
+				"unencumbered":                        []string{"unencumbered"},
+				"permissive":                          []string{"permissive"},
+				"notice":                              []string{"notice"},
+				"reciprocal":                          []string{"reciprocal"},
+				"restricted":                          []string{"restricted"},
+				"restricted_with_classpath_exception": []string{},
+				"restricted_allows_dynamic_linking":   []string{"restricted_allows_dynamic_linking"},
+				"proprietary":                         []string{"proprietary"},
+				"by_exception_only":                   []string{"by_exception_only"},
+				"not_allowed":                         []string{"not_allowed"},
+				"notice|proprietary":                  []string{"notice", "proprietary"},
 			},
 			expected: []string{
 				"unencumbered",
@@ -203,17 +203,17 @@
 			},
 			minus: &[]string{"restricted_allows_dynamic_linking"},
 			matchingAny: map[string][]string{
-				"unencumbered": []string{"unencumbered"},
-				"permissive":       []string{"permissive"},
-				"notice":     []string{"notice"},
-				"reciprocal":     []string{"reciprocal"},
-				"restricted":     []string{"restricted"},
-				"restricted_with_classpath_exception":     []string{"restricted_with_classpath_exception"},
-				"restricted_allows_dynamic_linking":     []string{},
-				"proprietary":     []string{"proprietary"},
-				"by_exception_only":     []string{"by_exception_only"},
-				"not_allowed":     []string{"not_allowed"},
-				"restricted|proprietary":     []string{"restricted", "proprietary"},
+				"unencumbered":                        []string{"unencumbered"},
+				"permissive":                          []string{"permissive"},
+				"notice":                              []string{"notice"},
+				"reciprocal":                          []string{"reciprocal"},
+				"restricted":                          []string{"restricted"},
+				"restricted_with_classpath_exception": []string{"restricted_with_classpath_exception"},
+				"restricted_allows_dynamic_linking":   []string{},
+				"proprietary":                         []string{"proprietary"},
+				"by_exception_only":                   []string{"by_exception_only"},
+				"not_allowed":                         []string{"not_allowed"},
+				"restricted|proprietary":              []string{"restricted", "proprietary"},
 			},
 			expected: []string{
 				"unencumbered",
@@ -254,35 +254,35 @@
 				"not_allowed",
 			},
 			matchingAny: map[string][]string{
-				"unencumbered": []string{},
-				"permissive":       []string{},
-				"notice":     []string{},
-				"reciprocal":     []string{},
-				"restricted":     []string{},
-				"restricted_with_classpath_exception":     []string{},
-				"restricted_allows_dynamic_linking":     []string{},
-				"proprietary":     []string{},
-				"by_exception_only":     []string{},
-				"not_allowed":     []string{},
-				"restricted|proprietary":     []string{},
+				"unencumbered":                        []string{},
+				"permissive":                          []string{},
+				"notice":                              []string{},
+				"reciprocal":                          []string{},
+				"restricted":                          []string{},
+				"restricted_with_classpath_exception": []string{},
+				"restricted_allows_dynamic_linking":   []string{},
+				"proprietary":                         []string{},
+				"by_exception_only":                   []string{},
+				"not_allowed":                         []string{},
+				"restricted|proprietary":              []string{},
 			},
 			expected: []string{},
 		},
 		{
-			name: "restrictedplus",
+			name:       "restrictedplus",
 			conditions: []string{"restricted", "restricted_with_classpath_exception", "restricted_allows_dynamic_linking"},
-			plus: &[]string{"permissive", "notice", "restricted", "proprietary"},
+			plus:       &[]string{"permissive", "notice", "restricted", "proprietary"},
 			matchingAny: map[string][]string{
-				"unencumbered":     []string{},
-				"permissive":     []string{"permissive"},
-				"notice":     []string{"notice"},
-				"restricted":     []string{"restricted"},
-				"restricted_with_classpath_exception":     []string{"restricted_with_classpath_exception"},
-				"restricted_allows_dynamic_linking":     []string{"restricted_allows_dynamic_linking"},
-				"proprietary":     []string{"proprietary"},
-				"restricted|proprietary":     []string{"restricted", "proprietary"},
-				"by_exception_only": []string{},
-				"proprietary|by_exception_only":     []string{"proprietary"},
+				"unencumbered":                        []string{},
+				"permissive":                          []string{"permissive"},
+				"notice":                              []string{"notice"},
+				"restricted":                          []string{"restricted"},
+				"restricted_with_classpath_exception": []string{"restricted_with_classpath_exception"},
+				"restricted_allows_dynamic_linking":   []string{"restricted_allows_dynamic_linking"},
+				"proprietary":                         []string{"proprietary"},
+				"restricted|proprietary":              []string{"restricted", "proprietary"},
+				"by_exception_only":                   []string{},
+				"proprietary|by_exception_only":       []string{"proprietary"},
 			},
 			expected: []string{"permissive", "notice", "restricted", "restricted_with_classpath_exception", "restricted_allows_dynamic_linking", "proprietary"},
 		},
@@ -629,7 +629,7 @@
 			if checkExpected(cs, t) {
 				checkMatching(cs, t)
 			}
-			if checkExpectedSet(cs, t){
+			if checkExpectedSet(cs, t) {
 				checkMatchingSet(cs, t)
 			}
 		})
@@ -639,7 +639,7 @@
 			if checkExpected(cs, t) {
 				checkMatching(cs, t)
 			}
-			if checkExpectedSet(cs, t){
+			if checkExpectedSet(cs, t) {
 				checkMatchingSet(cs, t)
 			}
 		})
@@ -649,7 +649,7 @@
 			if checkExpected(cs, t) {
 				checkMatching(cs, t)
 			}
-			if checkExpectedSet(cs, t){
+			if checkExpectedSet(cs, t) {
 				checkMatchingSet(cs, t)
 			}
 		})
diff --git a/tools/compliance/graph.go b/tools/compliance/graph.go
index efcc6e4..e73ab46 100644
--- a/tools/compliance/graph.go
+++ b/tools/compliance/graph.go
@@ -148,7 +148,7 @@
 type TargetEdgeList []*TargetEdge
 
 // Len returns the count of the elmements in the list.
-func (l TargetEdgeList) Len() int      { return len(l) }
+func (l TargetEdgeList) Len() int { return len(l) }
 
 // Swap rearranges 2 elements so that each occupies the other's former position.
 func (l TargetEdgeList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
@@ -171,7 +171,7 @@
 // edge with a context `ctx` defined by whatever process is creating the path.
 type TargetEdgePathSegment struct {
 	edge *TargetEdge
-	ctx interface{}
+	ctx  interface{}
 }
 
 // Target identifies the target that depends on the dependency.
@@ -495,7 +495,7 @@
 type TargetNodeList []*TargetNode
 
 // Len returns the count of elements in the list.
-func (l TargetNodeList) Len() int      { return len(l) }
+func (l TargetNodeList) Len() int { return len(l) }
 
 // Swap rearranges 2 elements so that each occupies the other's former position.
 func (l TargetNodeList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
diff --git a/tools/compliance/policy/policy.go b/tools/compliance/policy/policy.go
index 4261ed0..442025e 100644
--- a/tools/compliance/policy/policy.go
+++ b/tools/compliance/policy/policy.go
@@ -33,21 +33,21 @@
 	// proprietary or confidential pathnames to whether to strip the prefix
 	// from the path when used as the library name for notices.
 	SafePathPrefixes = map[string]bool{
-		"external/": true,
-		"art/": false,
-		"build/": false,
-		"cts/": false,
-		"dalvik/": false,
-		"developers/": false,
+		"external/":    true,
+		"art/":         false,
+		"build/":       false,
+		"cts/":         false,
+		"dalvik/":      false,
+		"developers/":  false,
 		"development/": false,
-		"frameworks/": false,
-		"packages/": true,
-		"prebuilts/": false,
-		"sdk/": false,
-		"system/": false,
-		"test/": false,
-		"toolchain/": false,
-		"tools/": false,
+		"frameworks/":  false,
+		"packages/":    true,
+		"prebuilts/":   false,
+		"sdk/":         false,
+		"system/":      false,
+		"test/":        false,
+		"toolchain/":   false,
+		"tools/":       false,
 	}
 
 	// SafePrebuiltPrefixes maps the regular expression to match a prebuilt
@@ -62,8 +62,8 @@
 
 	// ImpliesNotice lists the condition names implying a notice or attribution policy.
 	ImpliesNotice = LicenseConditionSet(UnencumberedCondition | PermissiveCondition | NoticeCondition | ReciprocalCondition |
-			RestrictedCondition | RestrictedClasspathExceptionCondition | WeaklyRestrictedCondition |
-			ProprietaryCondition | ByExceptionOnlyCondition)
+		RestrictedCondition | RestrictedClasspathExceptionCondition | WeaklyRestrictedCondition |
+		ProprietaryCondition | ByExceptionOnlyCondition)
 
 	// ImpliesReciprocal lists the condition names implying a local source-sharing policy.
 	ImpliesReciprocal = LicenseConditionSet(ReciprocalCondition)
@@ -143,7 +143,6 @@
 	return cs
 }
 
-
 // Resolution happens in three phases:
 //
 // 1. A bottom-up traversal propagates (restricted) license conditions up to
@@ -182,7 +181,6 @@
 // Not all restricted licenses are create equal. Some have special rules or
 // exceptions. e.g. LGPL or "with classpath excption".
 
-
 // depConditionsPropagatingToTarget returns the conditions which propagate up an
 // edge from dependency to target.
 //
@@ -204,7 +202,7 @@
 	}
 
 	result |= depConditions & LicenseConditionSet(RestrictedCondition)
-	if 0 != (depConditions & LicenseConditionSet(RestrictedClasspathExceptionCondition)) && !edgeNodesAreIndependentModules(e) {
+	if 0 != (depConditions&LicenseConditionSet(RestrictedClasspathExceptionCondition)) && !edgeNodesAreIndependentModules(e) {
 		result |= LicenseConditionSet(RestrictedClasspathExceptionCondition)
 	}
 	return result
@@ -264,13 +262,12 @@
 	}
 
 	result &= LicenseConditionSet(RestrictedCondition | RestrictedClasspathExceptionCondition)
-	if 0 != (result & LicenseConditionSet(RestrictedClasspathExceptionCondition)) && edgeNodesAreIndependentModules(e) {
+	if 0 != (result&LicenseConditionSet(RestrictedClasspathExceptionCondition)) && edgeNodesAreIndependentModules(e) {
 		result &= LicenseConditionSet(RestrictedCondition)
 	}
 	return result
 }
 
-
 // edgeIsDynamicLink returns true for edges representing shared libraries
 // linked dynamically at runtime.
 func edgeIsDynamicLink(e *TargetEdge) bool {
diff --git a/tools/compliance/policy/shareprivacyconflicts_test.go b/tools/compliance/policy/shareprivacyconflicts_test.go
index ad3f3f4..2d2a1d0 100644
--- a/tools/compliance/policy/shareprivacyconflicts_test.go
+++ b/tools/compliance/policy/shareprivacyconflicts_test.go
@@ -24,7 +24,7 @@
 type byConflict []SourceSharePrivacyConflict
 
 // Len returns the count of elements in the slice.
-func (l byConflict) Len() int      { return len(l) }
+func (l byConflict) Len() int { return len(l) }
 
 // Swap rearranged 2 elements so that each occupies the other's former
 // position.
diff --git a/tools/compliance/policy/shipped_test.go b/tools/compliance/policy/shipped_test.go
index 718e56f..25f6af0 100644
--- a/tools/compliance/policy/shipped_test.go
+++ b/tools/compliance/policy/shipped_test.go
@@ -29,30 +29,30 @@
 		expectedNodes []string
 	}{
 		{
-			name:      "singleton",
-			roots:     []string{"apacheLib.meta_lic"},
-			edges: []annotated{},
+			name:          "singleton",
+			roots:         []string{"apacheLib.meta_lic"},
+			edges:         []annotated{},
 			expectedNodes: []string{"apacheLib.meta_lic"},
 		},
 		{
-			name:      "simplebinary",
-			roots:     []string{"apacheBin.meta_lic"},
+			name:  "simplebinary",
+			roots: []string{"apacheBin.meta_lic"},
 			edges: []annotated{
 				{"apacheBin.meta_lic", "apacheLib.meta_lic", []string{"static"}},
 			},
 			expectedNodes: []string{"apacheBin.meta_lic", "apacheLib.meta_lic"},
 		},
 		{
-			name:      "simpledynamic",
-			roots:     []string{"apacheBin.meta_lic"},
+			name:  "simpledynamic",
+			roots: []string{"apacheBin.meta_lic"},
 			edges: []annotated{
 				{"apacheBin.meta_lic", "lgplLib.meta_lic", []string{"dynamic"}},
 			},
 			expectedNodes: []string{"apacheBin.meta_lic"},
 		},
 		{
-			name:      "container",
-			roots:     []string{"apacheContainer.meta_lic"},
+			name:  "container",
+			roots: []string{"apacheContainer.meta_lic"},
 			edges: []annotated{
 				{"apacheContainer.meta_lic", "apacheLib.meta_lic", []string{"static"}},
 				{"apacheContainer.meta_lic", "gplLib.meta_lic", []string{"static"}},
@@ -64,8 +64,8 @@
 			},
 		},
 		{
-			name:      "binary",
-			roots:     []string{"apacheBin.meta_lic"},
+			name:  "binary",
+			roots: []string{"apacheBin.meta_lic"},
 			edges: []annotated{
 				{"apacheBin.meta_lic", "apacheLib.meta_lic", []string{"static"}},
 				{"apacheBin.meta_lic", "gplLib.meta_lic", []string{"static"}},
@@ -77,8 +77,8 @@
 			},
 		},
 		{
-			name:      "binarydynamic",
-			roots:     []string{"apacheBin.meta_lic"},
+			name:  "binarydynamic",
+			roots: []string{"apacheBin.meta_lic"},
 			edges: []annotated{
 				{"apacheBin.meta_lic", "apacheLib.meta_lic", []string{"static"}},
 				{"apacheBin.meta_lic", "gplLib.meta_lic", []string{"dynamic"}},
@@ -89,8 +89,8 @@
 			},
 		},
 		{
-			name:      "containerdeep",
-			roots:     []string{"apacheContainer.meta_lic"},
+			name:  "containerdeep",
+			roots: []string{"apacheContainer.meta_lic"},
 			edges: []annotated{
 				{"apacheContainer.meta_lic", "apacheBin.meta_lic", []string{"static"}},
 				{"apacheBin.meta_lic", "apacheLib.meta_lic", []string{"static"}},
@@ -127,7 +127,7 @@
 
 			t.Logf("sorted nodes: [%s]", strings.Join(actualNodes, ", "))
 			t.Logf("expected nodes: [%s]", strings.Join(expectedNodes, ", "))
-                        if len(expectedNodes) != len(actualNodes) {
+			if len(expectedNodes) != len(actualNodes) {
 				t.Errorf("unexpected number of shipped nodes: %d nodes, want %d nodes",
 					len(actualNodes), len(expectedNodes))
 				return
diff --git a/tools/compliance/policy/walk.go b/tools/compliance/policy/walk.go
index 3e73088..f4d7bba 100644
--- a/tools/compliance/policy/walk.go
+++ b/tools/compliance/policy/walk.go
@@ -83,7 +83,7 @@
 // specific set of conditions.
 type resolutionKey struct {
 	target *TargetNode
-	cs LicenseConditionSet
+	cs     LicenseConditionSet
 }
 
 // WalkResolutionsForCondition performs a top-down walk of the LicenseGraph
diff --git a/tools/compliance/readgraph.go b/tools/compliance/readgraph.go
index c809a96..6f91e1c 100644
--- a/tools/compliance/readgraph.go
+++ b/tools/compliance/readgraph.go
@@ -185,7 +185,7 @@
 
 // addDependencies converts the proto AnnotatedDependencies into `edges`
 func addDependencies(lg *LicenseGraph, tn *TargetNode) error {
-	tn.edges = make(TargetEdgeList, 0,len(tn.proto.Deps))
+	tn.edges = make(TargetEdgeList, 0, len(tn.proto.Deps))
 	for _, ad := range tn.proto.Deps {
 		dependency := ad.GetFile()
 		if len(dependency) == 0 {
diff --git a/tools/compliance/resolution.go b/tools/compliance/resolution.go
index 6f15ca3..acc61e2 100644
--- a/tools/compliance/resolution.go
+++ b/tools/compliance/resolution.go
@@ -66,7 +66,7 @@
 type ResolutionList []Resolution
 
 // Len returns the count of elements in the list.
-func (l ResolutionList) Len() int      { return len(l) }
+func (l ResolutionList) Len() int { return len(l) }
 
 // Swap rearranges 2 elements so that each occupies the other's former position.
 func (l ResolutionList) Swap(i, j int) { l[i], l[j] = l[j], l[i] }
diff --git a/tools/compliance/resolutionset.go b/tools/compliance/resolutionset.go
index 893ef26..ef89883 100644
--- a/tools/compliance/resolutionset.go
+++ b/tools/compliance/resolutionset.go
@@ -65,7 +65,6 @@
 	return result
 }
 
-
 // AttachesToTarget returns true if the set contains conditions that
 // are `attachedTo`.
 func (rs ResolutionSet) AttachesToTarget(target *TargetNode) bool {
@@ -73,7 +72,6 @@
 	return isPresent
 }
 
-
 // Resolutions returns the list of resolutions that `attachedTo`
 // target must resolve. Returns empty list if no conditions apply.
 func (rs ResolutionSet) Resolutions(attachesTo *TargetNode) ResolutionList {
diff --git a/tools/compliance/test_util.go b/tools/compliance/test_util.go
index 8f4088a..26d7461 100644
--- a/tools/compliance/test_util.go
+++ b/tools/compliance/test_util.go
@@ -33,56 +33,56 @@
 
 	// GPL starts a test metadata file for GPL 2.0 licensing.
 	GPL = `` +
-`package_name: "Free Software"
+		`package_name: "Free Software"
 license_kinds: "SPDX-license-identifier-GPL-2.0"
 license_conditions: "restricted"
 `
 
 	// Classpath starts a test metadata file for GPL 2.0 with classpath exception licensing.
 	Classpath = `` +
-`package_name: "Free Software"
+		`package_name: "Free Software"
 license_kinds: "SPDX-license-identifier-GPL-2.0-with-classpath-exception"
 license_conditions: "restricted"
 `
 
 	// DependentModule starts a test metadata file for a module in the same package as `Classpath`.
 	DependentModule = `` +
-`package_name: "Free Software"
+		`package_name: "Free Software"
 license_kinds: "SPDX-license-identifier-MIT"
 license_conditions: "notice"
 `
 
 	// LGPL starts a test metadata file for a module with LGPL 2.0 licensing.
 	LGPL = `` +
-`package_name: "Free Library"
+		`package_name: "Free Library"
 license_kinds: "SPDX-license-identifier-LGPL-2.0"
 license_conditions: "restricted"
 `
 
 	// MPL starts a test metadata file for a module with MPL 2.0 reciprical licensing.
 	MPL = `` +
-`package_name: "Reciprocal"
+		`package_name: "Reciprocal"
 license_kinds: "SPDX-license-identifier-MPL-2.0"
 license_conditions: "reciprocal"
 `
 
 	// MIT starts a test metadata file for a module with generic notice (MIT) licensing.
 	MIT = `` +
-`package_name: "Android"
+		`package_name: "Android"
 license_kinds: "SPDX-license-identifier-MIT"
 license_conditions: "notice"
 `
 
 	// Proprietary starts a test metadata file for a module with proprietary licensing.
 	Proprietary = `` +
-`package_name: "Android"
+		`package_name: "Android"
 license_kinds: "legacy_proprietary"
 license_conditions: "proprietary"
 `
 
 	// ByException starts a test metadata file for a module with by_exception_only licensing.
 	ByException = `` +
-`package_name: "Special"
+		`package_name: "Special"
 license_kinds: "legacy_by_exception_only"
 license_conditions: "by_exception_only"
 `
@@ -91,22 +91,22 @@
 var (
 	// meta maps test file names to metadata file content without dependencies.
 	meta = map[string]string{
-		"apacheBin.meta_lic": AOSP,
-		"apacheLib.meta_lic": AOSP,
-		"apacheContainer.meta_lic": AOSP + "is_container: true\n",
-		"dependentModule.meta_lic": DependentModule,
+		"apacheBin.meta_lic":                 AOSP,
+		"apacheLib.meta_lic":                 AOSP,
+		"apacheContainer.meta_lic":           AOSP + "is_container: true\n",
+		"dependentModule.meta_lic":           DependentModule,
 		"gplWithClasspathException.meta_lic": Classpath,
-		"gplBin.meta_lic": GPL,
-		"gplLib.meta_lic": GPL,
-		"gplContainer.meta_lic": GPL + "is_container: true\n",
-		"lgplBin.meta_lic": LGPL,
-		"lgplLib.meta_lic": LGPL,
-		"mitBin.meta_lic": MIT,
-		"mitLib.meta_lic": MIT,
-		"mplBin.meta_lic": MPL,
-		"mplLib.meta_lic": MPL,
-		"proprietary.meta_lic": Proprietary,
-		"by_exception.meta_lic": ByException,
+		"gplBin.meta_lic":                    GPL,
+		"gplLib.meta_lic":                    GPL,
+		"gplContainer.meta_lic":              GPL + "is_container: true\n",
+		"lgplBin.meta_lic":                   LGPL,
+		"lgplLib.meta_lic":                   LGPL,
+		"mitBin.meta_lic":                    MIT,
+		"mitLib.meta_lic":                    MIT,
+		"mplBin.meta_lic":                    MPL,
+		"mplLib.meta_lic":                    MPL,
+		"proprietary.meta_lic":               Proprietary,
+		"by_exception.meta_lic":              ByException,
 	}
 )
 
@@ -204,7 +204,7 @@
 type byEdge []edge
 
 // Len returns the count of elements in the slice.
-func (l byEdge) Len() int      { return len(l) }
+func (l byEdge) Len() int { return len(l) }
 
 // Swap rearranges 2 elements of the slice so that each occupies the other's
 // former position.
@@ -219,7 +219,6 @@
 	return l[i].target < l[j].target
 }
 
-
 // annotated describes annotated test data edges to define test graphs.
 type annotated struct {
 	target, dep string
@@ -240,7 +239,7 @@
 	if e.dep != other.dep {
 		return false
 	}
-        if len(e.annotations) != len(other.annotations) {
+	if len(e.annotations) != len(other.annotations) {
 		return false
 	}
 	a1 := append([]string{}, e.annotations...)
@@ -401,7 +400,7 @@
 }
 
 // Len returns the count of elements in the slice.
-func (l actionList) Len() int      { return len(l) }
+func (l actionList) Len() int { return len(l) }
 
 // Swap rearranges 2 elements of the slice so that each occupies the other's
 // former position.
@@ -467,10 +466,10 @@
 		oprivacy := fields[0]
 		cprivacy := fields[1]
 		result = append(result, SourceSharePrivacyConflict{
-				newTestNode(lg, c.sourceNode),
-				newTestCondition(lg, oshare, cshare),
-				newTestCondition(lg, oprivacy, cprivacy),
-			})
+			newTestNode(lg, c.sourceNode),
+			newTestCondition(lg, oshare, cshare),
+			newTestCondition(lg, oprivacy, cprivacy),
+		})
 	}
 	return result
 }