Skip to content

Commit

Permalink
empty pr
Browse files Browse the repository at this point in the history
  • Loading branch information
burakvuraldatasance committed Jan 21, 2024
1 parent 15e8c57 commit 4d94568
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions internal/get/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ func generateControllerOutput(namespace string) (table [][]string, err error) {
}
addr, port := getAddressAndPort(ctrlConfig.GetEndpoint(), client.ControllerPortString)
expiryDate, agentSeats, err := util.getEntitlementDatasance()

if err != nil {
return nil, err
}

row := []string{
ctrlConfig.GetName(),
status,
Expand All @@ -124,9 +129,6 @@ func generateControllerOutput(namespace string) (table [][]string, err error) {
expiryDate,
agentSeats,
}
if err != nil {
return nil, err
}
table[idx+1] = append(table[idx+1], row...)
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/util/entitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,14 @@ func getEntitlementDatasance() (string, string, error){
return "","",err
}
fmt.Sprintf("Expiry Date: ", activationResponse.EntitlementExpiryDate)
var expiryDate=activationResponse.EntitlementExpiryDate
var agentSeats=""
expiryDate:=activationResponse.EntitlementExpiryDate
agentSeats:=""
for activationAttributeIndex,activationAttributeObject:= range activationResponse.Attributes {
_= activationAttributeIndex
if activationAttributeObject.Key == "Agent Seats"{
fmt.Sprintf("Number of agents: ", activationAttributeObject.Value)
agentSeats=activationAttributeObject.Value
agentSeats:=activationAttributeObject.Value

Check failure on line 204 in pkg/util/entitlement.go

View workflow job for this annotation

GitHub Actions / Build

agentSeats declared but not used (typecheck)
}
}
return expiryDate,agentSeats,nil
return expiryDate, agentSeats, nil
}

0 comments on commit 4d94568

Please sign in to comment.