From b093768732944e5a24c2b2d407d0a89b5d276115 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Wed, 26 Apr 2023 11:56:18 -0700 Subject: [PATCH] Export UpdateHash --- storebus.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storebus.go b/storebus.go index b7c03ec..d96e5d7 100644 --- a/storebus.go +++ b/storebus.go @@ -45,7 +45,7 @@ func (sb *StoreBus) Write(ctx context.Context, t string, obj any) error { sb.orderMu.Lock() defer sb.orderMu.Unlock() - if err := updateHash(obj); err != nil { + if err := UpdateHash(obj); err != nil { return jsrest.Errorf(jsrest.ErrInternalServerError, "hash update failed (%w)", err) } @@ -149,7 +149,7 @@ func (sb *StoreBus) registerChan(in <-chan any, out <-chan []any) { sb.chanMap[out] = in } -func updateHash(obj any) error { +func UpdateHash(obj any) error { m := *metadata.GetMetadata(obj) metadata.ClearMetadata(obj)