XiaoConstantine / mycli

A cli for bootstrap local dev
https://cli-dev.com
MIT License
0 stars 0 forks source link

Bug: URL Parse failing #29

Closed XiaoConstantine closed 2 months ago

XiaoConstantine commented 2 months ago

The following valid URL will be treated as invalid:

    inputURL := "https://github.com/XiaoConstantine/nvim_lua_config/init.lua"

    parsedURL, err := url.Parse(inputURL)

    fmt.Println(parsedURL.Path)
    fmt.Println(err)

    pathParts := strings.Split(parsedURL.Path, "/")
    if len(pathParts) < 5 {
        fmt.Println("invalid GitHub URL format")
    }

Since parsedURL.Path is XiaoConstantine/nvim_lua_config/init.lua