Skip to content

Commit

Permalink
graphs: remove unused function parameter
Browse files Browse the repository at this point in the history
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) {
  • Loading branch information
fho committed Nov 27, 2023
1 parent 8f560a4 commit 710dbad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composition.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"

"github.com/awalterschulze/gographviz"

"github.com/simplesurance/dependencies-tool/graphs"
)

Expand Down Expand Up @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion graphs/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 710dbad

Please # to comment.