diff options
author | Lunny Xiao | 2022-12-12 20:45:21 +0800 |
---|---|---|
committer | GitHub | 2022-12-12 20:45:21 +0800 |
commit | 36a2d2f919ee445f0374c210309b336e7c3c1f8e (patch) | |
tree | 05163a55f16f3e62ab9e3757e5ada977e1fdd6da /tools | |
parent | 6398ca745aabdc40f10465e71da99c5a3866990e (diff) |
Add a simple test for external renderer (#20033)
Fix #16402
Diffstat (limited to 'tools')
-rw-r--r-- | tools/external_renderer.go | 23 |
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) + } + } +} |