I’m not sure if this is a strictly snapd issue, or one for Ubuntu itself, but I thought to post it here anyway.
When you attempt to launch an application from the command line that isn’t installed, ubuntu provides a helpful list of possible commands to instll it. These commands now include a an entry to get the snap (if one exists).
The issue is that if that snap is setup with classic confinement, the command provided doesn’t reflect that, and you end up with an error when trying to install the snap with the command provided.
See example below
muyiscoi@Muyiwa-XPS13:~/Downloads$ go
Command 'go' not found, but can be installed with:
sudo snap install go # version 1.11.2, or
sudo apt install golang-go
sudo apt install gccgo-go
See 'snap info go' for additional versions.
muyiscoi@Muyiwa-XPS13:~/Downloads$ sudo snap install go
[sudo] password for muyiscoi:
error: This revision of snap "go" was published using classic confinement and thus may perform
arbitrary system changes outside of the security sandbox that snaps are usually confined to,
which may put your system at risk.
If you understand and want to proceed, repeat the command including --classic.