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

fix bug in list services maturity cmd #259

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

davidbloss
Copy link
Contributor

Issues

263

Changelog

Minor bugfix. Depends on upstream opslevel-go fixes

  • List your changes here
  • Make a changie entry

Tophatting

# In orange acct, where we have over 100 services
opslevel list services maturity -o csv > service_maturity.csv

@@ -30,7 +30,8 @@ There are multiple output formats that are useful
categoriesConn, err := client.ListCategories(nil)
cobra.CheckErr(err)
categories := categoriesConn.Nodes
data, err := client.ListServicesMaturity()
response, err := client.ListServicesMaturity(nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidbloss the nilaway PR I have is not ready yet, but this is an example of a situation where we're vulnerable to nil pointer exceptions.

The checkErr should be done before accessing response.Nodes since response could be nil.

Approving PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shuffled ✅

@davidbloss davidbloss marked this pull request as ready for review March 6, 2024 19:47
@davidbloss davidbloss merged commit 2ba2188 into main Mar 6, 2024
4 checks passed
@davidbloss davidbloss deleted the db/update-list-service-maturity branch March 6, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants