Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
実装ありがとうございます。方針はとてもよいと思います! 質問については,その通りでusecaseにItemRepositoryの依存を加える形で実装を進めてください。 go clean architecture などで調べると参考になりそうなコードが出てくるかもしれないので余裕があったら調べてみてください。 |
4f9e8d2 to
1b54b75
Compare
close #44
進捗
聞きたいこと
openapiの定義によれば、/comment エンドポイントにリクエストがあったとき、それが存在しないItemだった際は 404 エラーを返すことになっています。これを
usecase/commentで実装しようとしたのですが、どのように実装すればいいのかがあまりよくわかっていないです。usecase/comment.goに次のように書いて依存先を追加する感じで良いのでしょうか?そのうえで、
とする感じでしょうか?
書いたコードをまだ一度も実行していないため、正しく動くかはわかっていません。