The _______ function in Go is used to panic, terminating the program immediately with a runtime error message.

  • defer
  • error
  • panic
  • recover
The "panic" function in Go is used to cause the program to terminate immediately with a runtime error message. This function is typically called when a critical error occurs that cannot be gracefully handled, leading to an abrupt termination of the program.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *