generalize
This commit is contained in:
parent
7d8b99197f
commit
d7f30907ed
@ -16,7 +16,7 @@ func check(err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func markdown(path, source string) string {
|
func pipedCmd(path, source string) string {
|
||||||
cmd := exec.Command(path)
|
cmd := exec.Command(path)
|
||||||
in, err := cmd.StdinPipe()
|
in, err := cmd.StdinPipe()
|
||||||
check(err)
|
check(err)
|
||||||
@ -46,7 +46,7 @@ func main() {
|
|||||||
// binaries, remember their paths.
|
// binaries, remember their paths.
|
||||||
markdownPath, err := exec.LookPath("markdown");
|
markdownPath, err := exec.LookPath("markdown");
|
||||||
check(err)
|
check(err)
|
||||||
fmt.Print(markdown(markdownPath, "## wat"))
|
fmt.Print(pipedCmd(markdownPath, "## wat"))
|
||||||
// pygmentizePath, err := exec.LookPath("pygmentize")
|
// pygmentizePath, err := exec.LookPath("pygmentize")
|
||||||
// check(err)
|
// check(err)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user