---
title: "Discussion on \"Go Cheatsheet - Format Errors\" | Hashnode"
description: "Discussion on \"Go Cheatsheet - Format Errors\". Errors\nReturn simple error string\nreturn errors.New(\"Invalid Parameter\")\n\nReturn string with format\nreturn fmt.Errorf(\"user %q (id %d) not found\", name, id)"
url: "https://hashnode.com/posts/go-cheatsheet-format-errors/6080e70feb2bd30d2d22e5cd"
---

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

Discussion

# [Go Cheatsheet - Format Errors](https://hn.0xbf.me/go-cheatsheet-format-errors?utm_source=hashnode&utm_medium=feed)

Errors Return simple error string return errors.New("Invalid Parameter") Return string with format return fmt.Errorf("user %q (id %d) not found", name, id)

Apr 22, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
