snapd icon indicating copy to clipboard operation
snapd copied to clipboard

cmd/snap: Show snap links in `snap info` without `--verbose`

Open JGCarroll opened this issue 1 year ago • 0 comments

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.

  1. Remove verbose check, and move if-statement checking that links exist to top of code block for an easy micro-optomisation
  2. Remove "TestMaybePrintLinksContact", as this test is only functionally different to "TestMaybePrintLinksVerbose" in that it doesn't have the --verbose flag which no longer matters.
  3. Rename "TestMaybePrintLinksVerbose" to just "TestMaybePrintLinks" now that verbosity isn't an aspect of the test.

https://bugs.launchpad.net/snapd/+bug/2064651

JGCarroll avatar May 20 '24 23:05 JGCarroll