Skip to content

Commit 0d30096

Browse files
committed
Merge pull request #314 from QuentinPerez/ps
Ps
2 parents ae75f89 + a5009b9 commit 0d30096

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,7 @@ $ scw inspect myserver | jq '.[0].public_ip.address'
11831183

11841184
### master (unreleased)
11851185

1186+
* `scw ps` add commercial-type column
11861187
* Use `SCW_SECURE_EXEC` instead of `exec_exec`
11871188
* Remove `scaleway_api_endpoint` environment variable
11881189
* brew remove cache after install

pkg/commands/ps.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func RunPs(ctx CommandContext, args PsArgs) error {
5555
w := tabwriter.NewWriter(ctx.Stdout, 20, 1, 3, ' ', 0)
5656
defer w.Flush()
5757
if !args.Quiet {
58-
fmt.Fprintf(w, "SERVER ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tPORTS\tNAME\n")
58+
fmt.Fprintf(w, "SERVER ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tPORTS\tNAME\tCOMMERCIAL TYPE\n")
5959
}
6060
for _, server := range *servers {
6161

@@ -113,7 +113,7 @@ func RunPs(ctx CommandContext, args PsArgs) error {
113113
creationTime, _ := time.Parse("2006-01-02T15:04:05.000000+00:00", server.CreationDate)
114114
shortCreationDate := units.HumanDuration(time.Now().UTC().Sub(creationTime))
115115
port := server.PublicAddress.IP
116-
fmt.Fprintf(w, "%s\t%s\t\t%s\t%s\t%s\t%s\n", shortID, shortImage, shortCreationDate, server.State, port, shortName)
116+
fmt.Fprintf(w, "%s\t%s\t\t%s\t%s\t%s\t%s\t%s\n", shortID, shortImage, shortCreationDate, server.State, port, shortName, server.CommercialType)
117117
}
118118
skipServer:
119119
continue

0 commit comments

Comments
 (0)