So os.Stat itself gives error of what operation was being performed, filename and error. So we don't need to frame it ourselves, but with directory check we need to frame an error.
If file not found
henge kubernetes
stat docker-compose.yml: no such file or directory
If file is a directory
henge kubernetes -f ./complex
check ./complex: is a directory
So
os.Stat
itself gives error of what operation was being performed, filename and error. So we don't need to frame it ourselves, but with directory check we need to frame an error.If file not found
If file is a directory