mirror of
https://github.com/asciimoo/wuzz
synced 2024-11-16 12:13:21 +00:00
[fix] use defaultURLScheme if no scheme was specified
This commit is contained in:
parent
82d1ae6412
commit
c190d93ee2
2
wuzz.go
2
wuzz.go
@ -1550,7 +1550,7 @@ func (a *App) ParseArgs(g *gocui.Gui, args []string) error {
|
||||
default:
|
||||
u := args[arg_index]
|
||||
if strings.Index(u, "http://") != 0 && strings.Index(u, "https://") != 0 {
|
||||
u = "http://" + u
|
||||
u = fmt.Sprintf("%v://%v", a.config.General.DefaultURLScheme, u)
|
||||
}
|
||||
parsed_url, err := url.Parse(u)
|
||||
if err != nil || parsed_url.Host == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user