diff --git a/cli/keyring_list_test.go b/cli/keyring_list_test.go index 1c7a5fb9bf..b7e88ecf93 100644 --- a/cli/keyring_list_test.go +++ b/cli/keyring_list_test.go @@ -53,7 +53,8 @@ func TestKeyringList(t *testing.T) { outputString := output.String() // Use regex to extract the keys, and compare with the expected values - // We know the format the output should be, which is: "Keys in the keyring:\n- keyname1\n- keyname2\n- keyname3\n" + // We know what the format the output should be, which is: + // "Keys in the keyring:\n- keyname1\n- keyname2\n- keyname3\n" re := regexp.MustCompile(`-\s([^\n]+)`) matches := re.FindAllStringSubmatch(outputString, -1) var extractedKeys []string