@@ -18,7 +18,7 @@ import (
1818// workspaceListRow is the type provided to the OutputFormatter. This is a bit
1919// dodgy but it's the only way to do complex display code for one format vs. the
2020// other.
21- type workspaceListRow struct {
21+ type WorkspaceListRow struct {
2222// For JSON format:
2323codersdk.Workspace `table:"-"`
2424
@@ -40,7 +40,7 @@ type workspaceListRow struct {
4040DailyCost string `json:"-" table:"daily cost"`
4141}
4242
43- func workspaceListRowFromWorkspace (now time.Time ,workspace codersdk.Workspace )workspaceListRow {
43+ func WorkspaceListRowFromWorkspace (now time.Time ,workspace codersdk.Workspace )WorkspaceListRow {
4444status := codersdk .WorkspaceDisplayStatus (workspace .LatestBuild .Job .Status ,workspace .LatestBuild .Transition )
4545
4646lastBuilt := now .UTC ().Sub (workspace .LatestBuild .Job .CreatedAt ).Truncate (time .Second )
@@ -55,7 +55,7 @@ func workspaceListRowFromWorkspace(now time.Time, workspace codersdk.Workspace)
5555favIco = "★"
5656}
5757workspaceName := favIco + " " + workspace .OwnerName + "/" + workspace .Name
58- return workspaceListRow {
58+ return WorkspaceListRow {
5959Favorite :workspace .Favorite ,
6060Workspace :workspace ,
6161WorkspaceName :workspaceName ,
@@ -80,7 +80,7 @@ func (r *RootCmd) list() *serpent.Command {
8080filter cliui.WorkspaceFilter
8181formatter = cliui .NewOutputFormatter (
8282cliui .TableFormat (
83- []workspaceListRow {},
83+ []WorkspaceListRow {},
8484[]string {
8585"workspace" ,
8686"template" ,
@@ -107,7 +107,7 @@ func (r *RootCmd) list() *serpent.Command {
107107r .InitClient (client ),
108108),
109109Handler :func (inv * serpent.Invocation )error {
110- res ,err := queryConvertWorkspaces (inv .Context (),client ,filter .Filter (),workspaceListRowFromWorkspace )
110+ res ,err := QueryConvertWorkspaces (inv .Context (),client ,filter .Filter (),WorkspaceListRowFromWorkspace )
111111if err != nil {
112112return err
113113}
@@ -137,9 +137,9 @@ func (r *RootCmd) list() *serpent.Command {
137137// queryConvertWorkspaces is a helper function for converting
138138// codersdk.Workspaces to a different type.
139139// It's used by the list command to convert workspaces to
140- //workspaceListRow , and by the schedule command to
140+ //WorkspaceListRow , and by the schedule command to
141141// convert workspaces to scheduleListRow.
142- func queryConvertWorkspaces [T any ](ctx context.Context ,client * codersdk.Client ,filter codersdk.WorkspaceFilter ,convertF func (time.Time , codersdk.Workspace )T ) ([]T ,error ) {
142+ func QueryConvertWorkspaces [T any ](ctx context.Context ,client * codersdk.Client ,filter codersdk.WorkspaceFilter ,convertF func (time.Time , codersdk.Workspace )T ) ([]T ,error ) {
143143var empty []T
144144workspaces ,err := client .Workspaces (ctx ,filter )
145145if err != nil {