Skip to content

Commit c6a4b9a

Browse files
committed
feat(server): color state in server list output
1 parent 3551dc4 commit c6a4b9a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

internal/commands/server/list.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ func (s *listCommand) ExecuteWithoutArguments(exec commands.Executor) (output.Ou
3434
memory := s.MemoryAmount / 1024
3535
plan = fmt.Sprintf("%dxCPU-%dGB (custom)", s.CoreNumber, memory)
3636
}
37+
38+
coloredState := commands.ServerStateColour(s.State).Sprint(s.State)
39+
3740
rows = append(rows, output.TableRow{
3841
s.UUID,
3942
s.Hostname,
4043
plan,
4144
s.Zone,
42-
s.State,
45+
coloredState,
4346
})
4447
}
4548

0 commit comments

Comments
 (0)