Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unused hcapi.PlacementGroupClient #450

Merged
merged 1 commit into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions internal/hcapi/placementgroup.go

This file was deleted.

8 changes: 0 additions & 8 deletions internal/state/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,3 @@ func (c *State) LoadBalancerTypeNames() []string {
}
return c.loadBalancerClient.LoadBalancerTypeNames()
}

func (c *State) PlacementGroupNames() []string {
if c.placementGroupClient == nil {
client := c.Client()
c.placementGroupClient = &hcapi.PlacementGroupClient{PlacementGroupClient: &client.PlacementGroup}
}
return c.placementGroupClient.PlacementGroupNames()
}
17 changes: 8 additions & 9 deletions internal/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ type State struct {
Debug bool
DebugFilePath string

client *hcloud.Client
sshKeyClient *hcapi.SSHKeyClient
volumeClient *hcapi.VolumeClient
floatingIPClient *hcapi.FloatingIPClient
networkClient *hcapi.NetworkClient
loadBalancerClient *hcapi.LoadBalancerClient
serverClient *hcapi.ServerClient
firewallClient *hcapi.FirewallClient
placementGroupClient *hcapi.PlacementGroupClient
client *hcloud.Client
sshKeyClient *hcapi.SSHKeyClient
volumeClient *hcapi.VolumeClient
floatingIPClient *hcapi.FloatingIPClient
networkClient *hcapi.NetworkClient
loadBalancerClient *hcapi.LoadBalancerClient
serverClient *hcapi.ServerClient
firewallClient *hcapi.FirewallClient
}

func New() *State {
Expand Down