summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-12 20:45:21 +0800
committerGitHub <noreply@github.com>2022-12-12 20:45:21 +0800
commit36a2d2f919ee445f0374c210309b336e7c3c1f8e (patch)
tree05163a55f16f3e62ab9e3757e5ada977e1fdd6da /tools
parent6398ca745aabdc40f10465e71da99c5a3866990e (diff)
downloadgitea-36a2d2f919ee445f0374c210309b336e7c3c1f8e.tar.gz
gitea-36a2d2f919ee445f0374c210309b336e7c3c1f8e.zip
Add a simple test for external renderer (#20033)
Fix #16402
Diffstat (limited to 'tools')
-rw-r--r--tools/external_renderer.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/external_renderer.go b/tools/external_renderer.go
new file mode 100644
index 0000000000..c1fcc78f50
--- /dev/null
+++ b/tools/external_renderer.go
@@ -0,0 +1,23 @@
+// Copyright 2017 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+// gobuild: external_renderer
+
+package main
+
+import (
+ "fmt"
+ "io"
+ "os"
+)
+
+func main() {
+ if len(os.Args) > 1 {
+ fmt.Print(os.Args[1])
+ } else {
+ _, err := io.Copy(os.Stdout, os.Stdin)
+ if err != nil {
+ fmt.Println(err)
+ }
+ }
+}