Skip to content

Conversation

ShocOne
Copy link
Contributor

@ShocOne ShocOne commented Apr 2, 2024

Change

Code tidy up after cookiejar move to own package

Type of Change

tidy up

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • My corresponding pipelines / checks run clean and green without any errors or warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (readme)
  • I did format my code

@ShocOne ShocOne merged commit 4732100 into main Apr 2, 2024
// Correctly use url.Parse for parsing the URL string
parsedURL, err := url.Parse(urlString)
if err != nil {
log.Error("Failed to parse URL for cookie jar", zap.Error(err))

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
// PrintCookies prints the cookies stored in the HTTP client's cookie jar for a given URL.
func PrintCookies(client *http.Client, urlString string, log logger.Logger) {
if client.Jar == nil {
log.Error("Cookie jar is not initialized.")

Check warning

Code scanning / gosec

Errors unhandled.

Errors unhandled.
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.

1 participant