diff --git a/readme.md b/readme.md index d1960a2..4cb26e6 100644 --- a/readme.md +++ b/readme.md @@ -29,7 +29,15 @@ To create a new WAL instance, specify the directory to store logs and a prefix f ```go import "github.com/vadiminshakov/gowal" -wal, err := gowal.NewWAL("/path/to/logs", "prefix") +cfg := gowal.Config{ + Dir: "./segments", + Prefix: "log_", + SegmentThreshold: segmentThreshold, + MaxSegments: segmentsNumber, + IsInSyncDiskMode: false, +}) + +wal, err := gowal.NewWAL(cfg) if err != nil { log.Fatal(err) }