golang / gddo

Go Doc Dot Org
https://godoc.org
BSD 3-Clause "New" or "Revised" License
1.1k stars 266 forks source link

gosrc: prefer secure protocols for unknown vcs #607

Open urandom2 opened 5 years ago

urandom2 commented 5 years ago

github.com/golang/gddo/gosrc.vcsCmds first fetches over the http scheme[0]. Can we change this to default to secure protocols first? (e.g. []string{"https", "ssh", "http", "git"}

0] vcsCmd.schemes list http first for both svn and git. Then consumers range over schemes, meaning http gets hit first. While it is probably that most services 3xx over to https, this may not be the case for smaller source hosting platforms.