Skip to content

Commit

Permalink
Deprecate: old quiz template
Browse files Browse the repository at this point in the history
  • Loading branch information
takara2314 committed Jan 9, 2022
1 parent 521d6f9 commit 687ba8b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 68 deletions.
11 changes: 2 additions & 9 deletions common/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ const (
)

var (
Bot *linebot.Client
Quizzes QuizzesYaml
FlexQuiz []byte
Bot *linebot.Client
Quizzes QuizzesYaml

AntonymFormat []byte
HomonymFormat []byte
Expand Down Expand Up @@ -82,12 +81,6 @@ func init() {
panic(err)
}

FlexQuiz, err = ioutil.ReadFile("./templates/quiz.json")
if err != nil {
log.Println(err)
panic(err)
}

AntonymFormat, err = ioutil.ReadFile("./templates/Antonym.json")
if err != nil {
log.Println(err)
Expand Down
1 change: 0 additions & 1 deletion receive/textMessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func TextMessage(event *linebot.Event, message string) {
// Receive a text "quiz **"
err := quiz.Response(
event,
common.FlexQuiz,
)
if err != nil {
log.Println(err)
Expand Down
2 changes: 1 addition & 1 deletion reply/quiz/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/line/line-bot-sdk-go/linebot"
)

func Response(event *linebot.Event, flexQuiz []byte) error {
func Response(event *linebot.Event) error {
// Choice a quiz.
quiz := choice()

Expand Down
57 changes: 0 additions & 57 deletions templates/quiz.json

This file was deleted.

0 comments on commit 687ba8b

Please sign in to comment.