-
Notifications
You must be signed in to change notification settings - Fork 25
Daijin no kadai api #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ookura-mf
コメントした所以外は良さそうに思います!
fmt.Fprint(w, fmt.Sprintf("Only POST method is permitted\n")) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これだと200ステータスで帰ってしまうので、squareHandler同様にステータス書き込みが必要です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あぁ、確かにそうですね
追記しました!
@@ -74,6 +86,42 @@ func incrementHandler(w http.ResponseWriter, req *http.Request) { | |||
fmt.Fprint(w, fmt.Sprintf("Value of Counter is %d \n", counter)) | |||
} | |||
|
|||
func fizzbuzzHandler(w http.ResponseWriter, req *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fizzBuzz
でcamelCaseにするか、固有名詞としてfizzbuzz
にするか、どちらが良いんだろうかと思いました。
camelCaseを意識できているか気になってのコメントです。
把握はできていれば、後は好みなのでどちらでも良いと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fizzbuzzで固有名詞のつもりでした 👀
javaとかswiftとか書いてたのでcamelCaseは割となじんでます(たまに忘れる・・・
@ookura-mf |
No description provided.