Skip to content

Commit

Permalink
fix: getByExt incorrectly expecting pointers (#51)
Browse files Browse the repository at this point in the history
* fix: in getSubnetByExtID type is already dereferenced

* fix: in getClusterByExtID type is already dereferenced
  • Loading branch information
dkoshkin authored Dec 6, 2024
1 parent efd121a commit e15e7c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/client/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (n *clusterClient) getClusterByExtID(clusterExtID uuid.UUID) (*Cluster, err
}

switch apiCluster := cluster.(type) {
case *clustersapi.Cluster:
case clustersapi.Cluster:
if apiCluster.ExtId == nil {
return nil, fmt.Errorf("no extID found for cluster %q", clusterExtID)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/client/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func (n *networkingClient) getSubnetByExtID(subnetExtID uuid.UUID) (*Subnet, err
}

switch apiSubnet := subnet.(type) {
case *networkingapi.Subnet:
case networkingapi.Subnet:
if apiSubnet.ExtId == nil {
return nil, fmt.Errorf("no extID found for subnet %q", subnetExtID)
}
Expand Down

0 comments on commit e15e7c9

Please sign in to comment.