error walks.ErrInvalidRemoval contains

the correct value by reading it at compile time
This commit is contained in:
pippellia-btc
2025-09-19 17:50:37 +02:00
parent 7e4b8376ab
commit 076a3a40da

View File

@@ -3,7 +3,6 @@ package walks
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"log" "log"
"math/rand/v2" "math/rand/v2"
@@ -17,7 +16,7 @@ var (
Alpha = 0.85 // the dampening factor Alpha = 0.85 // the dampening factor
N = 100 // the walks per node N = 100 // the walks per node
ErrInvalidRemoval = errors.New("the walks to be removed are different than the expected number (100)") ErrInvalidRemoval = fmt.Errorf("the walks to be removed are different than the expected number (%d)", N)
) )
// ID represent how walks are identified in the storage layer // ID represent how walks are identified in the storage layer
@@ -29,7 +28,6 @@ func (id ID) MarshalBinary() ([]byte, error) { return []byte(id), nil }
type Walk struct { type Walk struct {
ID ID ID ID
Path []graph.ID Path []graph.ID
// Stop int
} }
// Len returns the lenght of the walk // Len returns the lenght of the walk