8000 refactor `pkg/xurl` · Issue #2390 · ignite/cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor pkg/xurl 8000 #2390

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

Closed
ilgooz opened this issue Apr 19, 2022 · 0 comments · Fixed by #2392
Closed

refactor pkg/xurl #2390

ilgooz opened this issue Apr 19, 2022 · 0 comments · Fixed by #2392
Assignees
Labels
type:error Something isn't working type:refactor

Comments

@ilgooz
Copy link
Member
ilgooz commented Apr 19, 2022

We should refactor this package to prevent possible bugs.

We need to refactor TCP, HTTP, HTTPS and WS funcs.

For ex. HTTPS used in the network c publish command.

Users may provide a url with http, in this case this func will add the https prefix anyway and broke the url.

To fix this, TCP, HTTP, HTTPS and WS should parse the url with url pkg

  • HTTPS: check if there is a schema, if schema is http then do nothing (no need to force to convert it to -s-), if schema is empty or something else then set https as schema.
  • HTTP: check if there is a schema, if schema is http then do nothing, if schema is empty or something else then set http as schema.
  • TCP: check if there is a schema, if schema is tcp then do nothing, if schema is empty or something else then set tcp as schema.
  • WS: check if there is a schema, if schema is ws then do nothing, if schema is empty or something else then set ws as schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:error Something isn't working type:refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0