-
Notifications
You must be signed in to change notification settings - Fork 47
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 staticcheck warnings #191
fix staticcheck warnings #191
Conversation
// Helper function to check the presence of a string in a slice | ||
func sliceContains(s []string, e string) bool { | ||
for _, a := range s { | ||
if a == e { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it because the lint was complaining about unused helper function
source := rand.NewSource(time.Now().UnixNano()) | ||
randomGenerator := rand.New(source) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed because rand.Seed is deprecated as of now.
@@ -45,7 +45,7 @@ func GetInfraList(c types.Credentials, pid string, request models.ListInfraReque | |||
return InfraData{}, err | |||
} | |||
|
|||
bodyBytes, err := ioutil.ReadAll(resp.Body) | |||
bodyBytes, err := io.ReadAll(resp.Body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ioutil is deprecated in favour of io and os
@deep-poharkar @Nageshbansal please review this PR |
Lgtm 🚀 |
looks good |
@kartikaysaxena can you please try to resolve the merge conflicts, we can take this PR in litmusctl 1.3.0 release |
ea2b541
to
9610e29
Compare
Signed-off-by: Kartikay <[email protected]>
9610e29
to
8d346af
Compare
Signed-off-by: Kartikay <[email protected]>
Hey @SarthakJain26, both my commits are signed off, and DCO is passing, but it is still showing that merging is blocked. Can you help with that? |
Signed-off-by: Kartikay <[email protected]>
@kartikaysaxena looks like there's one merge conflict, can you try resolving that as well please |
Signed-off-by: Kartikay <[email protected]>
Signed-off-by: Kartikay <[email protected]>
Signed-off-by: Kartikay <[email protected]>
Signed-off-by: Kartikay <[email protected]>
Thanks @kartikaysaxena for fixing this 🚀 |
Fixes #190