PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, December 17, 2022

[FIXED] What is this "err.(*exec.ExitError)" thing in Go code?

 December 17, 2022     go, syntax     No comments   

Issue

For instance, in this answer:

https://stackoverflow.com/a/10385867/20654

...
if exiterr, ok := err.(*exec.ExitError); ok {
...

What is that err.(*exec.ExitError) called? How does it work?


Solution

It's type assertion. I can't explain it better than the spec.



Answered By - Mostafa
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing