Skip to content

Commit

Permalink
Update main.go (#22)
Browse files Browse the repository at this point in the history
* Update main.go

* Update .golangci.json

* Update deploy.yml

* Update .golangci.json
  • Loading branch information
JustinDFuller authored Apr 30, 2024
1 parent d07fb3a commit 99afd28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
version: v1.54

- name: "build"
run: "timeout 120 .appengine/build.sh"
Expand Down
20 changes: 10 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func main() {
}
}

http.HandleFunc("/aphorism", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/aphorism", func(w http.ResponseWriter, _ *http.Request) {
entries, err := aphorism.Entries()
if err != nil {
http.Error(w, "Error reading Aphorisms", http.StatusInternalServerError)
Expand All @@ -142,7 +142,7 @@ func main() {
}
})

http.HandleFunc("/word", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/word", func(w http.ResponseWriter, _ *http.Request) {
entry, err := word.Entry("entries")
if err != nil {
http.Error(w, "Error reading Words", http.StatusInternalServerError)
Expand Down Expand Up @@ -186,7 +186,7 @@ func main() {
}
})

http.HandleFunc("/poem", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/poem", func(w http.ResponseWriter, _ *http.Request) {
entries, err := poem.Entries()
if err != nil {
http.Error(w, "Error reading poems.", http.StatusInternalServerError)
Expand All @@ -210,7 +210,7 @@ func main() {
http.ServeFile(w, r, "./make/grass.worker.js")
})

http.HandleFunc("/grass", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/grass", func(w http.ResponseWriter, _ *http.Request) {
if err := templates.ExecuteTemplate(w, "/make/grass.template.html", data{
Title: "Grass",
Meta: "grass",
Expand All @@ -219,7 +219,7 @@ func main() {
}
})

http.HandleFunc("/kit", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/kit", func(w http.ResponseWriter, _ *http.Request) {
if err := templates.ExecuteTemplate(w, "/make/kit.template.html", data{
Title: "A Game with Kit",
Meta: "kit",
Expand All @@ -228,7 +228,7 @@ func main() {
}
})

http.HandleFunc("/story", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/story", func(w http.ResponseWriter, _ *http.Request) {
if err := templates.ExecuteTemplate(w, "/story/main.template.html", data{
Title: "Story",
}); err != nil {
Expand Down Expand Up @@ -263,7 +263,7 @@ func main() {
}
})

http.HandleFunc("/review", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/review", func(w http.ResponseWriter, _ *http.Request) {
if err := templates.ExecuteTemplate(w, "/review/main.template.html", data{
Title: "Review",
}); err != nil {
Expand Down Expand Up @@ -298,15 +298,15 @@ func main() {
}
})

http.HandleFunc("/make", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/make", func(w http.ResponseWriter, _ *http.Request) {
if err := templates.ExecuteTemplate(w, "/make/main.template.html", data{
Title: "Make",
}); err != nil {
log.Printf("template execution error=%s template=%s", err, "/make/main.template.html")
}
})

http.HandleFunc("/nature", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/nature", func(w http.ResponseWriter, _ *http.Request) {
var entries [][]byte

files, err := os.ReadDir("./image/nature")
Expand Down Expand Up @@ -342,7 +342,7 @@ func main() {
http.ServeFile(w, r, "./site.webmanifest")
})

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
if err := templates.ExecuteTemplate(w, "/main.template.html", data{}); err != nil {
log.Printf("template execution error=%s template=%s", err, "/main.template.html")
}
Expand Down

0 comments on commit 99afd28

Please sign in to comment.