Code & Learn
Code & Learn
  • 122
  • 102 054
Updating Handlers to Handle Custom Store Errors
Enhance Error Handling in Go: Linking Handlers to Custom Store Errors
In this video, we explore how to update your Go application handlers to respond effectively to custom store errors we created in a previous video. By mapping these errors to appropriate HTTP status codes, you can provide meaningful feedback to API consumers and improve the reliability of your application.
What You’ll Learn:
- Linking handlers to specific error responses
- Mapping errors to relevant HTTP status codes
By the end of this tutorial, you’ll be able to enhance your Go application's error-handling capabilities, ensuring a better experience for users and developers alike.
Don’t forget to like, comment, and subscribe for more Go programming tutorials and API development tips!
Stay Connected:
- Discord Community: discord.gg/HUNg7PBX66
Code:
- GitHub Repo: github.com/codeandlearn1991/newsapi
มุมมอง: 121

วีดีโอ

Integrating Handlers with Our Custom PostgreSQL Store
มุมมอง 16015 ชั่วโมงที่ผ่านมา
Connect Handlers to Your Custom PostgreSQL Store in Go In this video, we demonstrate how to update your Go application handlers to integrate seamlessly with a PostgreSQL-based store created earlier. By connecting handlers to a robust database layer, you can enhance data management and streamline your application’s backend processes. What You’ll Learn: - Revisiting the PostgreSQL store implement...
Generating Mocks for Testing in Go with Gomock
มุมมอง 156วันที่ผ่านมา
Simplify Testing in Go with Gomock In this video, we’ll show you how to use Mockgen to generate mock implementations for your interfaces in Go. Mocks are essential for writing effective unit tests, and Mockgen simplifies the process by automating the creation of these mock structures. What You’ll Learn: - Generating mocks for Go interfaces - Writing unit tests using the generated mocks By the e...
What’s New in Go 1.24: Features, Updates, and More
มุมมอง 3.6K14 วันที่ผ่านมา
Explore What’s New in Go 1.24 In this video, we dive into the latest features and updates introduced in Go 1.24. Whether you’re a seasoned developer or just starting with Go, this release brings exciting enhancements to boost your productivity and streamline your development process. This includes but is not limited to the following: - Key features and changes in Go 1.24 - Improvements to the G...
Adding Development Tools to Your Go Project with tools.go
มุมมอง 48514 วันที่ผ่านมา
Manage Development Tools in Go Projects Using tools.go In this video, we’ll demonstrate how to effectively manage and integrate development tools into your Go projects using a dedicated `tools.go` file. This approach helps maintain version consistency and ensures your development environment is easily reproducible. What You’ll Learn: - The purpose of a `tools.go` file in Go projects - Adding an...
Setting Up a PostgreSQL Test Container for our Go Applications
มุมมอง 19921 วันที่ผ่านมา
Simplify Testing in Go with a PostgreSQL Test Container In this video, I will show you how to set up a PostgreSQL test container for your Go applications. Using test containers allows you to create isolated, reproducible environments for integration tests, ensuring your database interactions work flawlessly. What You’ll Learn: - Installing and configuring a PostgreSQL test container - Writing i...
Writing Database Tests with PostgreSQL Test Containers in Go
มุมมอง 22521 วันที่ผ่านมา
Streamline Database Testing in Go with Test Containers In this video, I will show you how to write effective database tests for your Go applications using test containers. Test containers provide a lightweight, isolated environment to thoroughly test your database interactions without impacting your local or production databases. What You’ll Learn: - Writing integration tests for database-depen...
Initializing Database Scripts in a PostgreSQL Test Container
มุมมอง 23421 วันที่ผ่านมา
Set Up PostgreSQL Test Containers with Initialization Scripts in Go In this video, I will demonstrate how to initialize your PostgreSQL test container with custom database scripts. This approach helps streamline testing workflows by automating schema setup, seeding test data, and configuring the database environment. Perfect for integration testing in Go projects, this tutorial will give you th...
Gracefully Handling Database Errors in our Go Application
มุมมอง 33928 วันที่ผ่านมา
Master Database Error Handling in Go Applications In this video, we’ll explore how to handle database errors gracefully in your Go applications. Managing errors effectively is crucial for building robust, user-friendly software, especially when working with databases. We’ll walk you through common database error scenarios and demonstrate strategies to handle them cleanly and efficiently. What Y...
Implementing Persistence in Your Go App with Postgres and Bun
มุมมอง 63828 วันที่ผ่านมา
Add Data Persistence to Your Go Application with Postgres and Bun In this video, I will show you how to integrate PostgreSQL into your Go application using the Bun ORM. Data persistence is a critical aspect of modern applications, and with Bun, you can streamline database interactions and write efficient, maintainable code. What You’ll Learn: - Setting up PostgreSQL for your Go application - In...
Simplifying Your Go Project Workflow with a Makefile
มุมมอง 365หลายเดือนก่อน
🔍 Video Overview: Streamline Your Go Project with a Makefile In this video, I will show you how to add a Makefile to your Go project to simplify and automate common tasks. A Makefile can help you manage your build process, run tests, clean up files, and streamline your development workflow. Whether you’re a beginner or an experienced developer, integrating a Makefile into your project can save ...
Enhancing Our Go Tests with Testify Assertions
มุมมอง 164หลายเดือนก่อน
🔍 Video Overview: Enhancing Our Go Tests with Testify Assertions In this video, we’ll explore how to improve your Go tests using the powerful Testify library. Testify provides a wide range of assertion functions that make your tests cleaner, more readable, and easier to maintain. Whether you’re a beginner or an experienced Go developer, this tutorial will help you take your test-writing skills ...
Adding an In-Memory Data Store to Our Go API Server
มุมมอง 762หลายเดือนก่อน
🔍 Video Overview: Adding an In-Memory Data Store to Our Go API Server In this video, we will go through adding an in-memory data store to our Go API server. An in-memory store is a simple and efficient way to manage data during runtime, making it ideal for prototyping, testing, or lightweight applications. We’ll cover the implementation process, key use cases, and how to integrate the store sea...
Building More API Handlers and Tests in Go
มุมมอง 256หลายเดือนก่อน
🔍 Video Overview: Building More API Handlers and Tests in Go In this video, we continue building our Go API by implementing additional handlers and testing them thoroughly. You’ll learn how to design, code, and test handlers to ensure your API is robust, scalable, and ready for production. From handling more complex logic to writing comprehensive test cases, this tutorial is packed with practic...
Implementing and Testing Handlers in Go with Mocks
มุมมอง 217หลายเดือนก่อน
🔍 Video Overview: Build and Test Go Handlers with Mocks In this video, we’ll take you through the process of implementing a handler in Go and testing it using mocks. Handlers are a critical part of any Go application, and testing them effectively ensures your application behaves as expected. By incorporating mocks, you’ll learn how to isolate your tests and focus on the handler logic. Don’t for...
Defining Request Body and Adding Validations
มุมมอง 668หลายเดือนก่อน
Defining Request Body and Adding Validations
Adding Request Logging Middleware to Our Go Application
มุมมอง 4952 หลายเดือนก่อน
Adding Request Logging Middleware to Our Go Application
Adding Structured Logging to Our Go Service for Better Insights
มุมมอง 6082 หลายเดือนก่อน
Adding Structured Logging to Our Go Service for Better Insights
Building a REST API Server Project in Go: Getting Started
มุมมอง 9012 หลายเดือนก่อน
Building a REST API Server Project in Go: Getting Started
Optimizing Concurrency in Go with Single Flight | Preventing Duplicate Work
มุมมอง 8502 หลายเดือนก่อน
Optimizing Concurrency in Go with Single Flight | Preventing Duplicate Work
Implementing a Fire-and-Forget Worker Pool in Go
มุมมอง 1.5K2 หลายเดือนก่อน
Implementing a Fire-and-Forget Worker Pool in Go
Effective Goroutine Management with Context in Go
มุมมอง 7743 หลายเดือนก่อน
Effective Goroutine Management with Context in Go
Go Concurrency Patterns: Unlocking the Power of Fan-In and Fan-Out
มุมมอง 4603 หลายเดือนก่อน
Go Concurrency Patterns: Unlocking the Power of Fan-In and Fan-Out
Go Concurrency Patterns | Building Efficient Streaming Data Pipelines
มุมมอง 6863 หลายเดือนก่อน
Go Concurrency Patterns | Building Efficient Streaming Data Pipelines
Error Handling in Goroutines | Best Practices and Examples in Go
มุมมอง 5074 หลายเดือนก่อน
Error Handling in Goroutines | Best Practices and Examples in Go
Preventing Goroutine Leaks in Go | Using the Done Channel Effectively
มุมมอง 5704 หลายเดือนก่อน
Preventing Goroutine Leaks in Go | Using the Done Channel Effectively
Mastering select and for-select | Essential Tools for Concurrency in Go
มุมมอง 1.4K4 หลายเดือนก่อน
Mastering select and for-select | Essential Tools for Concurrency in Go
Understanding Channels in Go with Code Examples
มุมมอง 4284 หลายเดือนก่อน
Understanding Channels in Go with Code Examples
Go sync.Pool with Code Examples
มุมมอง 6785 หลายเดือนก่อน
Go sync.Pool with Code Examples
Go sync.Once with Code Examples
มุมมอง 3595 หลายเดือนก่อน
Go sync.Once with Code Examples

ความคิดเห็น

  • @somyaranjandas4599
    @somyaranjandas4599 21 ชั่วโมงที่ผ่านมา

    Great tutorial never imagine this type of content exist in youtube for golang

  • @somyaranjandas4599
    @somyaranjandas4599 21 ชั่วโมงที่ผ่านมา

    sir could you please provide Notes ,it would help for upcoming interviews

    • @codeandlearnwithlove
      @codeandlearnwithlove 12 ชั่วโมงที่ผ่านมา

      Hello, I never created notes for these, but I did shares the slides used for the course. I hope this helps: drive.google.com/drive/folders/16Y-H54z2IVWcEMvnkeubCwyCj9f-bp5E?usp=drive_link

    • @somyaranjandas4599
      @somyaranjandas4599 6 ชั่วโมงที่ผ่านมา

      @@codeandlearnwithlove Thanks Kindness

  • @prashlovessamosa
    @prashlovessamosa 6 วันที่ผ่านมา

    Thanks 👍

  • @DavidTavan-n8z
    @DavidTavan-n8z 6 วันที่ผ่านมา

    I've just discovered your channel. Very good job! As a Go beginner, I learn so many things. Thanks :)

  • @johnmichaelechavez5979
    @johnmichaelechavez5979 12 วันที่ผ่านมา

    Make a golang with neovim setup

  • @rostyslav5334
    @rostyslav5334 12 วันที่ผ่านมา

    What's the name of your VsCode Theme ?

    • @codeandlearnwithlove
      @codeandlearnwithlove 12 วันที่ผ่านมา

      Here: vscodethemes.com/e/gsgualbano.baby-panda/baby-panda

  • @VarunGodiya
    @VarunGodiya 13 วันที่ผ่านมา

    Make vedio on one shot golang projects

    • @codeandlearnwithlove
      @codeandlearnwithlove 12 วันที่ผ่านมา

      I prefer this format for project because I can cover a log more details and create projects close to production applications.

  • @VarunGodiya
    @VarunGodiya 13 วันที่ผ่านมา

    Please bring golang backend project 🙏

  • @yasas-pj3xj
    @yasas-pj3xj 16 วันที่ผ่านมา

    Brilliant explanation.

  • @yasas-pj3xj
    @yasas-pj3xj 18 วันที่ผ่านมา

    Superb

  • @yasas-pj3xj
    @yasas-pj3xj 18 วันที่ผ่านมา

    Gold is here. Thanks a lot.

  • @underflowexception
    @underflowexception 18 วันที่ผ่านมา

    good video thank you

  • @joebeurg
    @joebeurg 18 วันที่ผ่านมา

    JSON tag omitzero is a life saver, imagine how much code we used to write to duplicate the same struct but only to assign some selected fields to a map or using a reflect. Good video BTW.

  • @selvamp5775
    @selvamp5775 19 วันที่ผ่านมา

    Super

  • @nellfs
    @nellfs 19 วันที่ผ่านมา

    Very good video!

  • @prashlovessamosa
    @prashlovessamosa 20 วันที่ผ่านมา

    thanks

  • @prashlovessamosa
    @prashlovessamosa 26 วันที่ผ่านมา

    👍

  • @Lonelyx.1
    @Lonelyx.1 27 วันที่ผ่านมา

    👍👍very much informative

  • @Lonelyx.1
    @Lonelyx.1 29 วันที่ผ่านมา

    FABULOUS!!!!

  • @Lonelyx.1
    @Lonelyx.1 หลายเดือนก่อน

    THANKS BUDDY!!!

  • @prashlovessamosa
    @prashlovessamosa หลายเดือนก่อน

    After this series please cover DSA fundamentals at least implementation of them would be too nice btw I am learning Gin along with Vue JS its hell of a combination. All thanks to you because of you I am able to write Go. Thanks 🙏 that's it

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      For sure, I am working on it. Btw can I ask you why Gin?

    • @prashlovessamosa
      @prashlovessamosa หลายเดือนก่อน

      @codeandlearnwithlove I was working as an intern for org name Fampay they were migrating their infrastructure from Django Rest Framework to Gin. Fiber can be a better choice but Gin is so good too. Std lib is good but our senior decided to go with Gin. I didn't know how to write to Go so I learnt go from you after that I started learning Gin so far enjoyed it.

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Thanks for the context, I was just curious because we always tend to prefer standard lib packages. But understand different dev teams have different experiences and as such preferences.

    • @prashlovessamosa
      @prashlovessamosa หลายเดือนก่อน

      ​@@codeandlearnwithlove although I am still below Junior I was assigned to Casbin work basically auth part of an app whole app was on EDA I think they were using the RabbitMQ I am not too sure. I didn't ask him too much btw he is the Java OG he told me he likes Gin in Go and Nest in the JS ecosystem. He also taught me how to develop lambdas in python later we did the same thing in go.

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      That’s nice. We tend to build our own stuff in the company I work for, when it comes to authn, authz, etc and use Kafka for pub sub. I think most of the technologies you use depends on the scale of the company. It’s good that you are learning different frameworks but when you gain experience, you will realize frameworks can sometimes be bit too much, at least that is my experience with them. Btw I am not judging but I have seen Java devs killing Go projects by trying to write Go with Java style of things.

  • @helloworld7796
    @helloworld7796 หลายเดือนก่อน

    Do you think cmd/internal is a little bit complex folder structure? I often get confused and lost in such structure, compared to the structure used in MVC? I am talking about web dev only.

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Different languages have different project directory structures which are treated idiomatic. In Go this directory structure is very common, internal is for non exported packages, while cmd holds main files for different applications. Go follows a more domain specific structures, MVC is not aligned with Go. I did a video about different Go idiomatic project structures, you can have a look at it or read the Go team’s blog.

    • @helloworld7796
      @helloworld7796 หลายเดือนก่อน

      @@codeandlearnwithlove Thank you for your answer! I will take a look at the project structures. Question, did you recorded or planning to, about grpc api and it's testing?

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      I do plan on creating a series on it, but will need some time.

    • @helloworld7796
      @helloworld7796 หลายเดือนก่อน

      @@codeandlearnwithlove Nice, thanks!

  • @prashlovessamosa
    @prashlovessamosa หลายเดือนก่อน

    Thanks please keep uploading every day.

  • @Lonelyx.1
    @Lonelyx.1 หลายเดือนก่อน

    amazing content brother !!!! keep going on. 🙌

  • @r_zza
    @r_zza หลายเดือนก่อน

    Videos are very helpful! One issue I noticed is this lesson is in the wrong order. It's after the hands-on example for Maps in your playlist "The Complete GoLang Course"

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Thanks for bringing it to my notice, I seems TH-cam is ordering it by dates uploaded. Sorry for the inconvenience.

  • @Golandia
    @Golandia หลายเดือนก่อน

    gracias otra vez me quedo muy claro como usar las go rutines y capturar el error

  • @Golandia
    @Golandia หลายเดือนก่อน

    gracias es muy buen contenido explicas muy bien

  • @Golandia
    @Golandia หลายเดือนก่อน

    muy bueno tu video entendi el unwrap y el join gracias

  • @davmaz
    @davmaz หลายเดือนก่อน

    Very nice and clear - thank you!

  • @meduza3132
    @meduza3132 หลายเดือนก่อน

    Thanks! You cleared it up for me

  • @Tay74514
    @Tay74514 หลายเดือนก่อน

    Im loving the course so far!

  • @Tay74514
    @Tay74514 หลายเดือนก่อน

    I'm watching this like a movie

  • @Tay74514
    @Tay74514 หลายเดือนก่อน

    So detailed. This course is legendary!

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Thanks a lot, your appreciation means a lot to me 😇

  • @Tay74514
    @Tay74514 หลายเดือนก่อน

    This is the best Restful Api tutorial EVER! I love it!

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Thanks, your comments mean a lot to believe me!

  • @Tay74514
    @Tay74514 หลายเดือนก่อน

    This is so high level 😊

  • @Tay74514
    @Tay74514 หลายเดือนก่อน

    Nice! I wondered why you didn't use the standard "fmt" Println( ) in the previous video. Love the content!

  • @prashlovessamosa
    @prashlovessamosa หลายเดือนก่อน

    I don't why comments getting deleted 🙃 whenever i try to give the answer of your reply

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Not sure what maybe be happening, but I don’t delete any comments from my side bro.

    • @prashlovessamosa
      @prashlovessamosa หลายเดือนก่อน

      @codeandlearnwithlove I commented thrice in the reply about async queue manager Don't why yt deleted that.

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      @@prashlovessamosa email me or reach out via discord, if the comments are still getting deleted.

  • @nabinsaud4688
    @nabinsaud4688 หลายเดือนก่อน

    Csn you share the github link for that?

    • @prashlovessamosa
      @prashlovessamosa หลายเดือนก่อน

      He will share after the completion of the series

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      th-cam.com/users/postUgkxBZyEAywIiFd1mcUkjQSsBUyM3wohJhjV?si=piNjYlmlV685e14W

  • @prashlovessamosa
    @prashlovessamosa หลายเดือนก่อน

    Can you please cover the async task manager in golang.

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      I am not sure what you mean by async task manager, can you please elaborate?

  • @prashlovessamosa
    @prashlovessamosa หลายเดือนก่อน

    Thanks 👍

  • @Lonelyx.1
    @Lonelyx.1 หลายเดือนก่อน

    Very much informative

  • @brajagopalmukherjee1588
    @brajagopalmukherjee1588 หลายเดือนก่อน

    I want to learn go ,can i follow the playlist sir ? Will u cover microservvices , deployment and all ? Any specific project are you covering? I actually come from frontend ,this is my go to backend learning

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Yes, I will try to cover most of those topics.

    • @prashlovessamosa
      @prashlovessamosa หลายเดือนก่อน

      Please cover kartos ​@@codeandlearnwithlove

  • @lee__3052
    @lee__3052 หลายเดือนก่อน

    thank you so much for the content, can't wait to continue further really appreciate all your work 🙏

  • @selvamp5775
    @selvamp5775 หลายเดือนก่อน

    Awesome! 🙏 Can we have options to set some fields with default value inside struct json definition instead of method while initialize

    • @codeandlearnwithlove
      @codeandlearnwithlove หลายเดือนก่อน

      Not directly, but there are ways you can do it by importing other packages.

  • @prashlovessamosa
    @prashlovessamosa 2 หลายเดือนก่อน

    Great

  • @vector_canYouDefet_me
    @vector_canYouDefet_me 2 หลายเดือนก่อน

    brother make a video about gorm....

    • @siya.abc123
      @siya.abc123 2 หลายเดือนก่อน

      Use sqlc and goose for migrations. Gorm is limiting and leads to bad queries

  • @vector_canYouDefet_me
    @vector_canYouDefet_me 2 หลายเดือนก่อน

    brother make a video about gorm....

    • @codeandlearnwithlove
      @codeandlearnwithlove 2 หลายเดือนก่อน

      Hi, I have used GORM in production projects and my experience hasn't been very pleasant with it. For this project, I am going to use Bun instead. In future, I will try to make a video on GORM.