Skip to content

Commit 20044bb

Browse files
authored
feat(server): deprecate datacenter column (#1301)
This marks the `datacenter` column for `hcloud server list` as deprecated and outputs a warning if it is used. Note: Even though Primary IPs have the datacenter property as well, the column is entirely missing in `hcloud primary-ip list`.
1 parent 92f34fb commit 20044bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/cmd/server/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ var ListCmd = &base.ListCmd[*hcloud.Server, schema.Server]{
9393
return server.Datacenter.Name
9494
}
9595
return "-"
96-
9796
}).
9897
AddFieldFn("location", func(server *hcloud.Server) string {
9998
return server.Location.Name
@@ -140,7 +139,8 @@ var ListCmd = &base.ListCmd[*hcloud.Server, schema.Server]{
140139
return "-"
141140
}
142141
return server.PlacementGroup.Name
143-
})
142+
}).
143+
MarkFieldAsDeprecated("datacenter", "The datacenter column is deprecated. Use location column instead.")
144144
},
145145

146146
Schema: hcloud.SchemaFromServer,

0 commit comments

Comments
 (0)