Skip to content

Commit

Permalink
make dependabot happy: bump/remove dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
amwolff committed Jan 24, 2024
1 parent d385bed commit 755517d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 24 deletions.
6 changes: 3 additions & 3 deletions cmd/example-2/example_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package main

import (
"fmt"
"log"

"github.com/amwolff/gorder"
"github.com/sirupsen/logrus"
)

func serialize(m map[int][]int) map[interface{}][]interface{} {
Expand Down Expand Up @@ -39,13 +39,13 @@ func main() {

output, err = gorder.TopologicalSort(serialize(digraph), "kahn")
if err != nil {
logrus.Fatal(err)
log.Fatal(err)
}
fmt.Printf("Solution (Kahn): %d\n", deserialize(output))

output, err = gorder.TopologicalSort(serialize(digraph), "dfsbased")
if err != nil {
logrus.Fatal(err)
log.Fatal(err)
}
fmt.Printf("Solution (DFS-based): %d\n", deserialize(output))
}
6 changes: 3 additions & 3 deletions cmd/example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package main

import (
"fmt"
"log"
"math"

"github.com/amwolff/gorder"
"github.com/sirupsen/logrus"
)

func main() {
Expand All @@ -25,13 +25,13 @@ func main() {

o, err = gorder.TopologicalSort(digraph, "kahn")
if err != nil {
logrus.Fatal(err)
log.Fatal(err)
}
fmt.Printf("Solution (Kahn): %v\n", o)

o, err = gorder.TopologicalSort(digraph, "dfsbased")
if err != nil {
logrus.Fatal(err)
log.Fatal(err)
}
fmt.Printf("Solution (DFS-based): %v\n", o)
}
12 changes: 6 additions & 6 deletions cmd/measurements/measurements.go
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
package main

import (
"log"
"time"

"github.com/amwolff/gorder"
"github.com/amwolff/gorder/dagenerator"
"github.com/davecgh/go-spew/spew"
"github.com/sirupsen/logrus"
)

func main() {
start := time.Now()
graph := dagenerator.Generate(10, 50, 30, 50, 30)
logrus.Infof("DAG generation time: %v", time.Since(start))
log.Printf("DAG generation time: %v", time.Since(start))

start = time.Now()
s, err := gorder.TopologicalSort(graph, "kahn")
logrus.Infof("Kahn resolve time: %v", time.Since(start))
log.Printf("Kahn resolve time: %v", time.Since(start))
if err != nil {
logrus.Fatal(err)
log.Fatal(err)
}
spew.Dump(s)

start = time.Now()
s, err = gorder.TopologicalSort(graph, "dfsbased")
logrus.Infof("DFS-based resolve time: %v", time.Since(start))
log.Printf("DFS-based resolve time: %v", time.Since(start))
if err != nil {
logrus.Fatal(err)
log.Fatal(err)
}
spew.Dump(s)
}
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ module github.com/amwolff/gorder

go 1.16

require (
github.com/davecgh/go-spew v1.1.1
github.com/sirupsen/logrus v1.8.1
)
require github.com/davecgh/go-spew v1.1.1
8 changes: 0 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

0 comments on commit 755517d

Please sign in to comment.