Skip to content

Commit

Permalink
Update indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bobek-balinek committed Aug 16, 2022
1 parent d138b18 commit 02431a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Initialize and integrate **contour** like so:
package main
import (
"net/http"
"github.com/bobek-balinek/contour"
"net/http"
"github.com/bobek-balinek/contour"
)
var tmpl *contour.Engine
func init() {
tmpl = contour.New("./views", ".html")
tmpl = contour.New("./views", ".html")
}
func main() {
mux := http.NewServeMux()
mux := http.NewServeMux()
mux.HandleFunc("/", index)
port := ":3000"
Expand All @@ -37,14 +37,14 @@ func main() {
func index(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
w.WriteHeader(http.StatusOK)
w.WriteHeader(http.StatusOK)
tmpl.Render(w, "index", map[string]interface{}{
tmpl.Render(w, "index", map[string]interface{}{
"Title": "Hello World",
}, "layouts/default")
if _, err := w.Write([]byte(out)); err != nil {
w.Write([]byte(err.Error()))
}
w.Write([]byte(err.Error()))
}
}
```

0 comments on commit 02431a1

Please sign in to comment.