Golang

2 posts / 0 new
Last post
boblewis1857's picture
Offline
Last seen: 1 year 2 months ago
Joined: 07/18/2023
Posts: 1
Force return error in golang

I want to test how certain code handles errors.

I want a function to return an error.

I have tried typing return 0/0 but then my application won't build

How can I force return an error?

Organization:
Keywords:
Subscribe to RSS - Golang