MCPcopy
hub / github.com/wavetermdev/waveterm / SetName

Function SetName

pkg/wcore/workspace.go:447–460  ·  view source on GitHub ↗
(workspaceId string, name string)

Source from the content-addressed store, hash-verified

445}
446
447func 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

Calls 2

DBGetFunction · 0.92
DBUpdateFunction · 0.92

Tested by

no test coverage detected