Created
October 16, 2013 00:35
-
-
Save subosito/7000860 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"github.com/subosito/iglo" | |
"log" | |
"os" | |
) | |
var fname = flag.String("out", "output.html", "Filename of the HTML output") | |
func main() { | |
flag.Parse() | |
f, err := os.Open("API.md") | |
if err != nil { | |
log.Fatal(err) | |
} | |
defer f.Close() | |
w, err := os.Create(*fname) | |
if err != nil { | |
log.Fatal(err) | |
} | |
defer w.Close() | |
err = iglo.MarkdownToHTML(w, f) | |
if err != nil { | |
log.Fatal(err) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment