1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-09 10:19:39 +02:00

Fix User-ID format in documentation and note invalid user-id formats in tests

This commit is contained in:
Paul Schaub 2022-07-12 10:33:43 +02:00
parent 56abb51757
commit 223cf009fc
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 6 additions and 4 deletions

View file

@ -8,11 +8,10 @@ However, it is agreed upon to use the
Below is a selection of possible User-IDs:
```
Firstname Lastname <email@address.tld> [Comment]
Firstname Lastname (Comment) <email@address.tld>
Firstname Lastname
Firstname Lastname [Comment]
Firstname Lastname (Comment)
<email@address.tld>
<email@address.tld> [Comment]
```
PGPainless comes with a builder class `UserId`, which can be used to safely construct User-IDs:
@ -29,5 +28,5 @@ UserId full = UserId.newBuilder()
.withEmail("peter@pgpainless.org")
.withComment("Work Address")
.build();
assertEquals("Peter Pattern <peter@pgpainless.org> [Work Address]", full.toString());
assertEquals("Peter Pattern (Work Address) <peter@pgpainless.org>", full.toString());
```