Removed deprecated Datacenter property from Server and PrimaryIP
Removed the deprecated Datacenter property from the Server and PrimaryIP resources. Since the property was already removed from the Hetzner Cloud API, we do not consider this a breaking change (see changelog entry).
Important
Action required: Please update all code that accesses Server.Datacenter or PrimaryIP.Datacenter to use the Location property instead, as shown below.
Before:
server, _, _ := client.Server.GetByID(ctx, 42)
fmt.Println(server.Datacenter.Location.Name)
primaryIP, _, _ := client.PrimaryIP.GetByID(ctx, 7)
fmt.Println(primaryIP.Datacenter.Location.Name)After:
server, _, _ := client.Server.GetByID(ctx, 42)
fmt.Println(server.Location.Name)
primaryIP, _, _ := client.PrimaryIP.GetByID(ctx, 7)
fmt.Println(primaryIP.Location.Name)