Skip to content

Make getCallBackURL less error prone#425

Open
tbuchaillot wants to merge 3 commits into
masterfrom
improve/callbackbaseurl
Open

Make getCallBackURL less error prone#425
tbuchaillot wants to merge 3 commits into
masterfrom
improve/callbackbaseurl

Conversation

@tbuchaillot

@tbuchaillot tbuchaillot commented Nov 7, 2024

Copy link
Copy Markdown
Contributor

Description

This PR makes the getCallBackURL function less error-prone using net/URL std lib from go to concatenate the URL parts.

Currently if the Callback base URL contains an extra "/" it fails. Example: https://go.dev/play/p/rb_JUyVJyup

Related Issue

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If pulling from your own
    fork, don't request your master!
  • Make sure you are making a pull request against the master branch (left side). Also, you should start
    your branch off our latest master.
  • My change requires a change to the documentation.
    • If you've changed APIs, describe what needs to be updated in the documentation.
    • If new config option added, ensure that it can be set via ENV variable
  • I have updated the documentation accordingly.
  • Modules and vendor dependencies have been updated; run go mod tidy && go mod vendor
  • When updating library version must provide reason/explanation for this update.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Check your code additions will not fail linting checks:
    • go fmt -s
    • go vet

@sonarqubecloud

sonarqubecloud Bot commented Nov 7, 2024

Copy link
Copy Markdown

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