Skip to content

Commit

Permalink
Getting rid of snowflake package
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpert committed Sep 11, 2022
1 parent c44db3e commit 6a23d7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/fsnotify/fsnotify v1.5.4
github.com/fxamacker/cbor/v2 v2.4.0
github.com/gin-gonic/gin v1.4.0
github.com/godruoyi/go-snowflake v0.0.1
github.com/lni/dragonboat/v3 v3.3.5
github.com/mattn/go-sqlite3 v1.14.15
github.com/rs/zerolog v1.27.0
Expand Down
4 changes: 2 additions & 2 deletions marmot.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"errors"
"flag"
"fmt"
"math/rand"
"strings"
"time"

"github.com/maxpert/marmot/db"
"github.com/maxpert/marmot/lib"

"github.com/godruoyi/go-snowflake"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
)
Expand All @@ -19,7 +19,7 @@ func main() {
cleanup := flag.Bool("cleanup", false, "Cleanup all hooks and tables")
dbPathString := flag.String("db-path", "/tmp/marmot.db", "Path to SQLite database")
metaPath := flag.String("raft-path", "/tmp/raft", "Path to save raft information")
nodeID := flag.Uint64("node-id", uint64(snowflake.PrivateIPToMachineID()), "Node ID")
nodeID := flag.Uint64("node-id", rand.Uint64(), "Node ID")
followFlag := flag.Bool("follow", false, "Start Raft in follower mode")
shards := flag.Uint64("shards", 16, "Total number of shards for this instance")
bindAddress := flag.String("bind", "0.0.0.0:8160", "Bind address for Raft server")
Expand Down

0 comments on commit 6a23d7a

Please sign in to comment.