Mercurial > repos > public > wdown
annotate wdown.go @ 0:4f279dcbfb16
Initial commit
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 16 Jun 2020 14:10:30 +0200 |
parents | |
children | adf9c2b90279 |
rev | line source |
---|---|
0 | 1 package main |
2 | |
3 import ( | |
4 "io/ioutil" | |
5 "log" | |
6 "os" | |
7 | |
8 "github.com/yuin/goldmark" | |
9 ) | |
10 | |
11 func main() { | |
12 source, err := ioutil.ReadFile(os.Args[1]) | |
13 | |
14 if err != nil { | |
15 log.Fatal(err) | |
16 } | |
17 | |
18 err = goldmark.Convert(source, os.Stdout) | |
19 | |
20 if err != nil { | |
21 log.Fatal(err) | |
22 } | |
23 } |