summaryrefslogtreecommitdiff
path: root/doc/articles/wiki/htmlify.go
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2012-02-27 11:25:43 +1100
committerAndrew Gerrand <adg@golang.org>2012-02-27 11:25:43 +1100
commitcd1a2f7e74b9a697cacfeee971cdba506b032eb2 (patch)
tree731f0c3d00df3864653c9407b7b36696e1d05d3e /doc/articles/wiki/htmlify.go
parentb49dcb9d37cd5856fe273a0ceb56e70ce03e969f (diff)
downloadgo-git-cd1a2f7e74b9a697cacfeee971cdba506b032eb2.tar.gz
doc: move wiki tutorial into articles directory, rmdir doc/codelab
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5701050
Diffstat (limited to 'doc/articles/wiki/htmlify.go')
-rw-r--r--doc/articles/wiki/htmlify.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/articles/wiki/htmlify.go b/doc/articles/wiki/htmlify.go
new file mode 100644
index 0000000000..2a845a1740
--- /dev/null
+++ b/doc/articles/wiki/htmlify.go
@@ -0,0 +1,16 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "io/ioutil"
+ "os"
+ "text/template"
+)
+
+func main() {
+ b, _ := ioutil.ReadAll(os.Stdin)
+ template.HTMLEscape(os.Stdout, b)
+}