# Parsing deeplinks by url.Parse may fail

## Why

This question starts with a deeplink `1mg://www.1mg.com/search`.

```go
package main  
  
import (  
	"fmt"  
	"net/url"  
	"runtime"  
)  
  
func main() {  
	fmt.Println(url.Parse("1mg://www.1mg.com/search"))  
	// <nil> parse "1mg://www.1mg.com/search": first path segment in URL cannot contain colon  
}
```

[\[Go Playground\]](https://play.golang.org/p/JdirGheHSHT?fbclid=IwAR0byo3BjM-GPtrT6FeRVeX4mz18IwVTPzGnyK9gOgLBWXwn0yE8P4Ql1ns)

## Is it a bug?

After I test some cases, I found that `url.Parse` doesn't limit the scheme of uri to `http` or `https`. It failed if the scheme starts with a digit.

Here is the comment for parsing scheme:

```go
// Maybe rawURL is of the form scheme:path.
// (Scheme must be [a-zA-Z][a-zA-Z0-9+.-]*)
// If so, return scheme, path; else return "", rawURL.
func getScheme(rawURL string) (scheme, path string, err error) {
...
```

In the document of URI [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#appendix-B)

>    scheme        = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

It means that uri scheme implementation of golang fit the standard.
