github.com/varialus/godfly@v0.0.0-20130904042352-1934f9f095ab/doc/articles/wiki/htmlify.go (about)

     1  // Copyright 2010 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  import (
     8  	"io/ioutil"
     9  	"os"
    10  	"text/template"
    11  )
    12  
    13  func main() {
    14  	b, _ := ioutil.ReadAll(os.Stdin)
    15  	template.HTMLEscape(os.Stdout, b)
    16  }