aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLunny Xiao2022-12-12 20:45:21 +0800
committerGitHub2022-12-12 20:45:21 +0800
commit36a2d2f919ee445f0374c210309b336e7c3c1f8e (patch)
tree05163a55f16f3e62ab9e3757e5ada977e1fdd6da /tools
parent6398ca745aabdc40f10465e71da99c5a3866990e (diff)
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 000000000..c1fcc78f5
--- /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)
+ }
+ }
+}