stupid entity stringier for testing.
(ent *openpgp.Entity)
| 229 | |
| 230 | // stupid entity stringier for testing. |
| 231 | func entityString(ent *openpgp.Entity) string { |
| 232 | var buf bytes.Buffer |
| 233 | fmt.Fprintf(&buf, "PublicKey=%s", ent.PrimaryKey.KeyIdShortString()) |
| 234 | var ids []string |
| 235 | for k := range ent.Identities { |
| 236 | ids = append(ids, k) |
| 237 | } |
| 238 | sort.Strings(ids) |
| 239 | for _, k := range ids { |
| 240 | fmt.Fprintf(&buf, " id[%q]", k) |
| 241 | } |
| 242 | return buf.String() |
| 243 | } |
no test coverage detected