From 710dbad5493b91c4b6f33b9a96dffb2e81cc62c1 Mon Sep 17 00:00:00 2001 From: Fabian Holler Date: Thu, 23 Nov 2023 18:17:04 +0100 Subject: [PATCH] graphs: remove unused function parameter Fix the following golangci-lint warning: graphs/graph.go:51:40: unused-parameter: parameter 'c' seems to be unused, consider removing or renaming it as _ (revive) func (g *Graph) AddEdge(v1, v2 string, c float64) { --- composition.go | 3 ++- graphs/graph.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composition.go b/composition.go index 95e9111..39ea298 100644 --- a/composition.go +++ b/composition.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/awalterschulze/gographviz" + "github.com/simplesurance/dependencies-tool/graphs" ) @@ -250,7 +251,7 @@ func sortableGraph(comp Composition) (graph *graphs.Graph, err error) { for depservice := range dependencies.DependsOn { d := sanitize(depservice) - graph.AddEdge(s, d, 0) + graph.AddEdge(s, d) } } diff --git a/graphs/graph.go b/graphs/graph.go index b3920e0..ba2804e 100644 --- a/graphs/graph.go +++ b/graphs/graph.go @@ -48,7 +48,7 @@ func (g *Graph) AddVertex(v string) { // AddEdge adds an edge to the graph. The edge connects // vertex v1 and vertex v2. -func (g *Graph) AddEdge(v1, v2 string, c float64) { +func (g *Graph) AddEdge(v1, v2 string) { g.AddVertex(v1) g.AddVertex(v2)