summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go25
1 files changed, 3 insertions, 22 deletions
diff --git a/main.go b/main.go
index 14dec49..65d9321 100644
--- a/main.go
+++ b/main.go
@@ -7,28 +7,9 @@ import (
"log"
"net/http"
"os"
-)
-
-type option struct {
- Text string
- Arc string
-}
-
-type arc struct {
- Title string
- Story []string
- Options []option
-}
-type story map[string]arc
-
-func (s story) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- arc := r.PathValue("arc")
- title := s[arc].Title
-
- w.Header().Set("Content-Type", "text/plain")
- io.WriteString(w, title)
-}
+ "git.brandonirizarry.xyz/adventure/internal/types"
+)
func main() {
// Set up log flags.
@@ -50,7 +31,7 @@ func main() {
log.Fatal(err)
}
- var s story
+ var s types.Story
if err := json.Unmarshal(jsonBytes, &s); err != nil {
log.Fatal(err)
}