aboutsummaryrefslogtreecommitdiffstats
path: root/templates/package
diff options
context:
space:
mode:
Diffstat (limited to 'templates/package')
-rw-r--r--templates/package/content/go.tmpl14
-rw-r--r--templates/package/view.tmpl1
2 files changed, 15 insertions, 0 deletions
diff --git a/templates/package/content/go.tmpl b/templates/package/content/go.tmpl
new file mode 100644
index 0000000000..2343d945b3
--- /dev/null
+++ b/templates/package/content/go.tmpl
@@ -0,0 +1,14 @@
+{{if eq .PackageDescriptor.Package.Type "go"}}
+ <h4 class="ui top attached header">{{.locale.Tr "packages.installation"}}</h4>
+ <div class="ui attached segment">
+ <div class="ui form">
+ <div class="field">
+ <label>{{svg "octicon-terminal"}} {{.locale.Tr "packages.go.install"}}</label>
+ <div class="markup"><pre class="code-block"><code>GOPROXY=<gitea-origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/go"></gitea-origin-url> go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}</code></pre></div>
+ </div>
+ <div class="field">
+ <label>{{.locale.Tr "packages.go.documentation" "https://docs.gitea.io/en-us/usage/packages/go" | Safe}}</label>
+ </div>
+ </div>
+ </div>
+{{end}}
diff --git a/templates/package/view.tmpl b/templates/package/view.tmpl
index 3c42c3adfd..5285a0838d 100644
--- a/templates/package/view.tmpl
+++ b/templates/package/view.tmpl
@@ -28,6 +28,7 @@
{{template "package/content/container" .}}
{{template "package/content/debian" .}}
{{template "package/content/generic" .}}
+ {{template "package/content/go" .}}
{{template "package/content/helm" .}}
{{template "package/content/maven" .}}
{{template "package/content/npm" .}}