03-adventure/

directory
v0.0.0-...-56ad08b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MIT

README

Gophercises - 3 - Create Your Own Adventure

Problem

Solutions

  • Normal: Implement the webapp.
  • Bonus
    • Cli mode. Use --cli.
    • Set alternate starting page with --home intro.
    • Change the story file with --book gopher.json.
    • Change the webapp port with --port 1234.''

Lessons Learned

JSON to Objects Mappings

Maps to a []object or array of objects:

[
    { 
        "key1": "value1",
        "key2": "value2"
    },
    { 
        "key1": "value3",
        "key2": "value4"
    }
]

Maps to a map of [string]object

{
	"object1": {
		"key1": "value1",
		"key2": "value2"
	},
	"object2": {
		"key1": "value3",
		"key2": "value4"
	}
}
"html/template"
"text/template"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL