From 257bd520f63bd0ce403aacee2253e5b76a5d15dd Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 19:45:52 +0000 Subject: [PATCH] docs(ax): prefer declarative config literals in examples Co-Authored-By: Virgil --- README.md | 1 + doc.go | 8 +++++--- docs/index.md | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1749a84..24bd322 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ func main() { BucketName: "events", }, PurgeInterval: 30 * time.Second, + WorkspaceStateDirectory: "/tmp/core-state", }) if err != nil { return diff --git a/doc.go b/doc.go index 3c21636..bb98054 100644 --- a/doc.go +++ b/doc.go @@ -16,9 +16,10 @@ // already available, because it reads as data rather than a sequence of // steps. Use `StoreConfig.Normalised()` when you want the default purge // interval and workspace state directory filled in before you pass the config -// onward. Use `store.WithWorkspaceStateDirectory("/tmp/core-state")` only -// when the workspace path is assembled incrementally rather than declared up -// front. +// onward. Include `WorkspaceStateDirectory: "/tmp/core-state"` in the struct +// literal when the path is known; use `store.WithWorkspaceStateDirectory` +// only when the workspace path is assembled incrementally rather than +// declared up front. // // Usage example: // @@ -31,6 +32,7 @@ // BucketName: "events", // }, // PurgeInterval: 20 * time.Millisecond, +// WorkspaceStateDirectory: "/tmp/core-state", // }) // if err != nil { // return diff --git a/docs/index.md b/docs/index.md index cf8f016..74e3ed2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -32,6 +32,7 @@ func main() { storeInstance, err := store.NewConfigured(store.StoreConfig{ DatabasePath: "/tmp/app.db", PurgeInterval: 30 * time.Second, + WorkspaceStateDirectory: "/tmp/core-state", }) if err != nil { return