diff options
Diffstat (limited to 'cmd/site/internal/front/front_test.go')
| -rw-r--r-- | cmd/site/internal/front/front_test.go | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/cmd/site/internal/front/front_test.go b/cmd/site/internal/front/front_test.go deleted file mode 100644 index bdc56d1..0000000 --- a/cmd/site/internal/front/front_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package front_test - -import ( - "fmt" - "log" - - "christine.website/cmd/site/internal/front" -) - -var markdown = []byte(`--- -title: Ferrets -authors: - - Tobi - - Loki - - Jane ---- -Some content here, so -interesting, you just -want to keep reading.`) - -type article struct { - Title string - Authors []string -} - -func Example() { - var a article - - content, err := front.Unmarshal(markdown, &a) - if err != nil { - log.Fatalf("error unmarshalling: %s", err) - } - - fmt.Printf("%#v\n", a) - fmt.Printf("%s\n", string(content)) - // Output: - // front_test.article{Title:"Ferrets", Authors:[]string{"Tobi", "Loki", "Jane"}} - // - // Some content here, so - // interesting, you just - // want to keep reading. -} |
