aboutsummaryrefslogtreecommitdiff
path: root/internal/front/front_test.go
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2019-12-09 10:48:40 -0500
committerGitHub <noreply@github.com>2019-12-09 10:48:40 -0500
commiteb26857c1d5973bedc91c3fc1acaf4434809bbd5 (patch)
tree926be802355da24afb3cf6ed8496a2b2d656e1a1 /internal/front/front_test.go
parent583cf248b3fe7ebb06d89ba32fddeee70fb14c2c (diff)
downloadxesite-eb26857c1d5973bedc91c3fc1acaf4434809bbd5.tar.xz
xesite-eb26857c1d5973bedc91c3fc1acaf4434809bbd5.zip
Within package layout (#102)
* blog: go package layout * eat my own dogfood * internal: test date * blog/go-package-layout: streamline * oops
Diffstat (limited to 'internal/front/front_test.go')
-rw-r--r--internal/front/front_test.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/internal/front/front_test.go b/internal/front/front_test.go
deleted file mode 100644
index 42094f5..0000000
--- a/internal/front/front_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package front_test
-
-import (
- "fmt"
- "log"
-
- "christine.website/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.
-}