~samwhited/xmpp

ref: b2f3a9a952493ffcf467eafa59803c27fa099e2d xmpp/jid d---------
jid: minor code cleanup of With* methods
jid: add more validation on WithLocal/WithResource
internal/jid: use new internal error message

[ci skip]
jid: add WithDomain method

Fixes #35

goos: linux
goarch: amd64
pkg: mellium.im/xmpp/jid
BenchmarkWithDomain-8   	20000000	        94.7 ns/op	      16 B/op	       1 allocs/op
PASS
ok  	mellium.im/xmpp/jid	2.008s
jid: add WithLocal method

Also add one new test for WithResource

See #35

goos: linux
goarch: amd64
pkg: mellium.im/xmpp/jid
BenchmarkWithLocal-8   	 5000000	       215 ns/op	      40 B/op	       2 allocs/op
PASS
ok  	mellium.im/xmpp/jid	1.353s
xmpp: fix missing error handling
jid: give JIDs copy semantics
jid: add unsafe JID parsing API
jid: update Transformer docs
all: update copyright message

[ci skip]
jid: remove a malloc from WithResource

benchmark                   old ns/op     new ns/op     delta
BenchmarkWithResource-8     267           234           -12.36%

benchmark                   old allocs     new allocs     delta
BenchmarkWithResource-8     4              3              -25.00%

benchmark                   old bytes     new bytes     delta
BenchmarkWithResource-8     104           72            -30.77%
jid: add benchmark for WithResource
jid: minor package level docs rework

[ci skip]
jid: remove unused const

Rewrap some copyright comments
jid: add WithResource
jid: use jid_test package

Use subtests
Minor testing cleanup
More escape tests
jid: add new escape/unescape benchmarks
jid: improve package docs

[ci skip]
jid: add a few new benchmarks
jid: alloc test broken by coverage instrumentation
jid: fix and test String()

benchmark                      old ns/op     new ns/op     delta
BenchmarkSplit-4               34.5          33.2          -3.77%
BenchmarkParseString-4         645           639           -0.93%
BenchmarkParseStringIPv4-4     669           663           -0.90%
BenchmarkParseStringIPv6-4     705           703           -0.28%
BenchmarkNew-4                 607           603           -0.66%
BenchmarkCopy-4                3.09          3.07          -0.65%
BenchmarkBare-4                3.81          3.11          -18.37%
BenchmarkString-4              66.7          66.7          +0.00%
BenchmarkEscape-4              86.1          85.6          -0.58%
BenchmarkUnescape-4            271           270           -0.37%
Next