You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</span></span></code></pre></div><h2id=-whats-next>π¨βπ« What’s nextβ¦</h2><p>In the next article, weβll add the request logs, error logs and the logger to our application.</p></div><footer><timedatetime=2025-06-29><i>π</i> Updated: 2025-06-29</time>
415
+
</span></span></code></pre></div><h2id=-whats-next>π¨βπ« What’s nextβ¦</h2><p>In the next article, weβll add the request logs, error logs and the logger to our application.</p></div><footer><timedatetime=2025-07-14><i>π</i> Updated: 2025-07-14</time>
<aclass=hidden>Next <i>οΉ₯</i></a></footer></article><aside><div><buttonclass=btn><i>β</i>Close</button></div><strong>On this page</strong><navid=TableOfContents><ul><li><ahref=#adding-error-messages-to-the-api>Adding error messages to the API</a><ul><li><ahref=#1-identify-and-standardize-errors>1. Identify and standardize errors</a></li><li><ahref=#2-define-helper-functions>2. Define helper functions</a></li><li><ahref=#3-update-api-handlers>3. Update API handlers</a></li></ul></li><li><ahref=#adding-validator-to-the-api>Adding validator to the API</a><ul><li><ahref=#1-add-go-playgroundvalidator>1. Add <code>go-playground/validator</code></a></li><li><ahref=#2-set-validation-tags>2. Set validation tags</a></li><li><ahref=#3-add-utilvalidatorvalidatorgo>3. Add <code>util/validator/validator.go</code></a></li><li><ahref=#4-add-validator-as-an-api-dependency>4. Add validator as an API dependency</a></li><li><ahref=#5-update-router>5. Update router</a></li><li><ahref=#6-update-cmdapimaingo>6. Update <code>cmd/api/main.go</code></a></li><li><ahref=#7--run-go-mod-tidy>7. Run <code>go mod tidy</code></a></li></ul></li><li><ahref=#using-validator-from-handlers>Using validator from handlers</a><ul><li><ahref=#1-add-utilvalidatorresponsego>1. Add <code>util/validator/response.go</code></a></li><li><ahref=#2-update-handlers>2. Update handlers</a></li></ul></li><li><ahref=#-final-project-structure>π Final project structure</a></li><li><ahref=#-whats-next>π¨βπ« What’s nextβ¦</a></li></ul></nav></aside></main><footer><div><i>π§βπ»</i>Built by and copyright<ahref=https://github.com/dumindutarget=_blank>Dumindu Madunuwan</a><i>π </i> 2019-2025<i>π</i><ahref=https://github.com/learning-cloud-native-gotarget=_blank>GitHub</a></div><div><buttonclass=btn><i>βοΈ</i><i>β</i><i>π</i></button></div></footer></div></div><divid=body-model-outer></div><scripttype=text/javascriptsrc=/assets/js/docs.min.12ffdc25c0149ef34e761ee54587f2aae17affcb8375298ad2180851930cb142.jsintegrity></script></body></html>
0 commit comments