Skip to content

Conversation

@gozeloglu
Copy link
Contributor

@gozeloglu gozeloglu commented Sep 20, 2021

  • main.go simplified
  • network related lines moved to src/client.go
  • proxy is set to client.

I did not create a new file named as proxy.go, because it seems not really necessary for now. There is no special task related to proxy. But, we can discuss about creating a new file.

Update after 7be7d0c commit

I added proxy.go file to handle proxy related tasks.

Usage

gURL is open source CLI tool written in Go.

Usage:
  gURL [options...] <url> [flags]
  gURL [command]

Available Commands:
  GET         Fetches data from given url
  help        Help about any command

Flags:
  -h, --help           help for gURL
  -x, --proxy string   [protocol://]host[:port] Use this proxy

Use "gURL [command] --help" for more information about a command.

--proxy or -x flags takes string input.

Example Usage

$ gurl --proxy proxy://myproxy:8080 www.mysite.com
$ gurl -x proxy://myproxy:8080 www.mysite.com

* main.go simplified
* network related lines moved to src/client.go
@gozeloglu gozeloglu requested a review from hmert September 20, 2021 19:26
@gozeloglu
Copy link
Contributor Author

Before merging it, I need to add something.

* proxy related tasks moved to flag.go --> proxyCmd()
* default port number added to proxy url
* url variable renamed to URL because of name conflict with url pkg
@hmert hmert merged commit cb2653c into main Sep 21, 2021
@hmert hmert deleted the proxy branch September 21, 2021 08:03
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.

3 participants