Function
SetName
(workspaceId string, name string)
Source from the content-addressed store, hash-verified
| 445 | } |
| 446 | |
| 447 | func SetName(workspaceId string, name string) error { |
| 448 | ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) |
| 449 | defer cancel() |
| 450 | ws, e := wstore.DBGet[*waveobj.Workspace](ctx, workspaceId) |
| 451 | if e != nil { |
| 452 | return e |
| 453 | } |
| 454 | if ws == nil { |
| 455 | return fmt.Errorf("workspace not found: %q", workspaceId) |
| 456 | } |
| 457 | ws.Name = name |
| 458 | wstore.DBUpdate(ctx, ws) |
| 459 | return nil |
| 460 | } |
Callers
nothing calls this directly
Tested by
no test coverage detected