28 lines
378 B
Go
28 lines
378 B
Go
|
package emdbed
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
)
|
||
|
|
||
|
func Example() {
|
||
|
fi, err := testdata.Open("testdata/main.md")
|
||
|
defer fi.Close()
|
||
|
out, err := Convert("testdata", fi)
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
fmt.Println(out)
|
||
|
// Output:
|
||
|
//<!-- emdbed: main.go -->
|
||
|
//```go
|
||
|
//package main
|
||
|
//
|
||
|
//import "fmt"
|
||
|
//
|
||
|
//func main() {
|
||
|
// fmt.Println("Hello, world!")
|
||
|
//}
|
||
|
// ```
|
||
|
//<!-- /emdbed -->
|
||
|
}
|