mirror of
https://github.com/aljazceru/crawler_v2.git
synced 2025-12-17 07:24:21 +01:00
error walks.ErrInvalidRemoval contains
the correct value by reading it at compile time
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user