snapd
snapd copied to clipboard
cmd/snap: Show snap links in `snap info` without `--verbose`
The default behaviour of snapcraft.io and the Snap Store GUI is to show links such as "source-code" or "issue tracker". This patch makes snap info behave comparably by removing the requirement to pass --verbose to see the full links metadata.
- Remove verbose check, and move if-statement checking that links exist to top of code block for an easy micro-optomisation
- Remove "TestMaybePrintLinksContact", as this test is only functionally different to "TestMaybePrintLinksVerbose" in that it doesn't have the --verbose flag which no longer matters.
- Rename "TestMaybePrintLinksVerbose" to just "TestMaybePrintLinks" now that verbosity isn't an aspect of the test.
https://bugs.launchpad.net/snapd/+bug/2064651