From 5527c5bf6b65fb8ea8b88a8384d56617e2be8dcf Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 16:49:48 +0000 Subject: [PATCH] docs(store): prefer config literals in examples Co-Authored-By: Virgil --- store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/store.go b/store.go index 4746273..85a0564 100644 --- a/store.go +++ b/store.go @@ -67,7 +67,7 @@ func (storeConfig StoreConfig) Validate() error { } // Usage example: `config := storeInstance.JournalConfiguration(); fmt.Println(config.EndpointURL, config.Organisation, config.BucketName)` -// Usage example: `store.New(":memory:", store.WithJournal("http://127.0.0.1:8086", "core", "events"))` +// Usage example: `store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", Journal: store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086", Organisation: "core", BucketName: "events"}})` type JournalConfiguration struct { // Usage example: `config := store.JournalConfiguration{EndpointURL: "http://127.0.0.1:8086"}` EndpointURL string @@ -169,7 +169,7 @@ func WithJournal(endpointURL, organisation, bucketName string) StoreOption { } } -// Usage example: `storeInstance, err := store.New(":memory:", store.WithWorkspaceStateDirectory("/tmp/core-state"))` +// Usage example: `storeInstance, err := store.NewConfigured(store.StoreConfig{DatabasePath: ":memory:", WorkspaceStateDirectory: "/tmp/core-state"})` func WithWorkspaceStateDirectory(directory string) StoreOption { return func(storeConfig *StoreConfig) { if storeConfig == nil {