Skip to content

Commit

Permalink
style: lint + compile
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienaury committed Mar 22, 2024
1 parent e62665c commit ef4bbc9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ module github.com/cgi-fr/silo
go 1.21

require (
github.com/dominikbraun/graph v0.23.0
github.com/rs/zerolog v1.28.0
github.com/stretchr/testify v1.9.0
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
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/dominikbraun/graph v0.23.0 h1:TdZB4pPqCLFxYhdyMFb1TBdFxp8XLcJfTTBQucVPgCo=
github.com/dominikbraun/graph v0.23.0/go.mod h1:yOjYyogZLY1LSG9E33JWZJiq5k83Qy2C6POAuiViluc=
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
Expand Down
6 changes: 3 additions & 3 deletions pkg/silo/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ func (d *Driver) Dump() error {
return nil
}

func (d *Driver) dump(snapshot Snapshot, node string, done map[string]any, id int) error {
func (d *Driver) dump(snapshot Snapshot, node string, done map[string]any, uuid int) error {
connectedNodes, err := snapshot.PullAll(node)
if err != nil {
return fmt.Errorf("%w", err)
}

for _, connectedNode := range connectedNodes {
if _, ok := done[connectedNode]; !ok {
_ = d.writer.Write(connectedNode, strconv.Itoa(id))
_ = d.writer.Write(connectedNode, strconv.Itoa(uuid))
done[connectedNode] = nil

if err := d.dump(snapshot, connectedNode, done, id); err != nil {
if err := d.dump(snapshot, connectedNode, done, uuid); err != nil {
return fmt.Errorf("%w", err)
}
}
Expand Down

0 comments on commit ef4bbc9

Please sign in to comment.