Switch to gometalinter

Only small amount of required checks is enabled,
plan is to enable more linters as issues are fixed in the code.
This commit is contained in:
Andrey Smirnov
2017-03-23 00:50:49 +03:00
parent 53e59d3765
commit 516dd7b044
80 changed files with 201 additions and 123 deletions
+12 -11
View File
@@ -2,8 +2,9 @@ package deb
import (
"fmt"
"github.com/awalterschulze/gographviz"
"strings"
"github.com/awalterschulze/gographviz"
)
// BuildGraph generates graph contents from aptly object database
@@ -18,15 +19,15 @@ func BuildGraph(collectionFactory *CollectionFactory, layout string) (gographviz
var labelEnd string
switch layout {
case "vertical":
graph.AddAttr("aptly", "rankdir", "LR")
labelStart = ""
labelEnd = ""
case "horizontal":
fallthrough
default:
labelStart = "{"
labelEnd = "}"
case "vertical":
graph.AddAttr("aptly", "rankdir", "LR")
labelStart = ""
labelEnd = ""
case "horizontal":
fallthrough
default:
labelStart = "{"
labelEnd = "}"
}
existingNodes := map[string]bool{}
@@ -94,7 +95,7 @@ func BuildGraph(collectionFactory *CollectionFactory, layout string) (gographviz
"shape": "Mrecord",
"style": "filled",
"fillcolor": "cadetblue1",
"label": fmt.Sprintf("%sSnapshot %s|%s|pkgs: %d%s", labelStart,
"label": fmt.Sprintf("%sSnapshot %s|%s|pkgs: %d%s", labelStart,
snapshot.Name, description, snapshot.NumPackages(), labelEnd),
})