---
title: "Discussion on \"Error Handling in Go (Part-2)\" | Hashnode"
description: "Discussion on \"Error Handling in Go (Part-2)\". Creating errors with errors.New() function\nIf we don't need a custom type for an error, and we can work with a single error type then we can use errors.New() function to create an error on the fly.\nCreating a new error is simple. We simply need to ca..."
url: "https://hashnode.com/posts/error-handling-in-go-part-2/63f3f8122ab63958c3eeea60"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Error Handling in Go (Part-2)](https://pratikjagrut.space/error-handling-in-go-part-2?utm_source=hashnode&utm_medium=feed)

Creating errors with errors.New() function If we don't need a custom type for an error, and we can work with a single error type then we can use errors.New() function to create an error on the fly. Creating a new error is simple. We simply need to ca...

Nov 19, 2022 · 9 min read · pratikjagrut.space  
Updated Mar 7, 2023  
Read the article

-   [#go](https://hashnode.com/tag/go)
-   [#error-handling](https://hashnode.com/tag/error-handling)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#programming-languages](https://hashnode.com/tag/programming-languages)
-   [#error-handling-in-go](https://hashnode.com/tag/error-handling-in-go)

## Written by

[Pratik Jagrut](https://hashnode.com/@pratikjagrut)

@pratikjagrut · Pune, India

  
[View profile](https://hashnode.com/@pratikjagrut)

An engineer interested in developing cloud native applications

👋 Hey there! I'm a community-driven software engineer, and I absolutely love diving into the world of cloud-native development and exploring the endless possibilities of open-source technologies. 💻 My skill set revolves around Kubernetes, GoLang, Python, Docker, and other fascinating container technologies. 🚀 And hey, just to add to the mix, I'm also CKA certified! 🎓 But you know what? My journey doesn't stop at coding. I have a genuine passion for technical evangelism. 🎤 I've had the privilege to speak at world-renowned events, sharing my knowledge and insights with others. It's such an exhilarating experience! And when I'm not on stage, you can find me pouring my thoughts into engaging technical blogs. 📝 If you've made it this far and you're intrigued by what you've read, let's not leave it at that! Reach out, and let's connect. Who knows what exciting opportunities may be awaiting us? 😊

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
