roycefan / gitiles

Automatically exported from code.google.com/p/gitiles
0 stars 0 forks source link

add golang meta import tag #58

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Go can import code from a Gitiles server if a meta tag is included.

Go import:

  import "example.org/repo/foo/bar"

This will be fetched by https:// and Gitiles should serve in the HTML:

  <meta name="go-import" content="example.org git https://code.org/r/p/exproj">

http://golang.org/cmd/go/#hdr-Remote_import_paths

Original issue reported on code.google.com by sop@google.com on 17 Jul 2014 at 9:41

GoogleCodeExporter commented 9 years ago
This will allow people to type example.org/repo/foo/bar instead of 
example.org/repo/foo/bar.git, which avoids an unnecesssary/slow git:// check. 
That's good.

Go also supports example.org/repo.git/foo/bar for path foo/bar under 
example.org/repo(.git). I don't know how we could make this work within gitiles.

Original comment by dborowitz@google.com on 18 Jul 2014 at 4:35