Export UpdateHash

This commit is contained in:
Ian Gulliver
2023-04-26 11:56:18 -07:00
parent cbeb948449
commit b093768732

View File

@@ -45,7 +45,7 @@ func (sb *StoreBus) Write(ctx context.Context, t string, obj any) error {
sb.orderMu.Lock() sb.orderMu.Lock()
defer sb.orderMu.Unlock() 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) 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 sb.chanMap[out] = in
} }
func updateHash(obj any) error { func UpdateHash(obj any) error {
m := *metadata.GetMetadata(obj) m := *metadata.GetMetadata(obj)
metadata.ClearMetadata(obj) metadata.ClearMetadata(obj)