diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-13 04:27:29 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-13 04:27:29 -0400 |
commit | ea74be2f2eb2356666c39448019956f9fe1c1f99 (patch) | |
tree | bb195120174ca3fd9b782e831d6c498ab7489816 /modules/base | |
parent | d26a333dfbd47e9b6f92fad7fcd779ad72070f8a (diff) | |
download | gitea-ea74be2f2eb2356666c39448019956f9fe1c1f99.tar.gz gitea-ea74be2f2eb2356666c39448019956f9fe1c1f99.zip |
go get
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/base.go | 2 | ||||
-rw-r--r-- | modules/base/template.go | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/modules/base/base.go b/modules/base/base.go index 84cf41c8d6..3e80a436e4 100644 --- a/modules/base/base.go +++ b/modules/base/base.go @@ -54,3 +54,5 @@ const ( BindingBooleanTypeError string = "BooleanTypeError" BindingFloatTypeError string = "FloatTypeError" ) + +var GoGetMetas = make(map[string]bool) diff --git a/modules/base/template.go b/modules/base/template.go index 6241497969..863bd89e81 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -197,3 +197,15 @@ func DiffLineTypeToStr(diffType int) string { } return "same" } + +const ( + TPL_GO_GET_META = `<meta name="go-import" content="%s git %s">` +) + +func GetGoGetMetaList() []byte { + buf := bytes.NewBuffer([]byte("")) + for meta := range GoGetMetas { + buf.WriteString(fmt.Sprintf(TPL_GO_GET_META, Domain, meta)) + } + return buf.Bytes() +} |