We will want to validate that all tag key/value data is valid unicode.
This commit changes the validation helper to only validate provided
tags, since measurements are currently very likely to contain invalid
utf-8 characters.
There are two exceptions to the tag validation: the validation of the
special tag keys for measurements and field keys.
I did this with a dumb editor macro, so some comments changed too.
Also rename root package from platform to influxdb.
In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.
Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
Prior to this change, `go test -count=2 ./models` would fail like:
--- FAIL: TestMarshal (0.00s)
points_test.go:37: got: ,A\ FOO=bar,APPLE=orange,host=serverA,region=uswest
points_test.go:38: exp: ,apple=orange,foo=bar,host=serverA,region=uswest
points_test.go:39: invalid match
because a later test reassigned the package-level variable that
TestMarshal depends on. Don't reassign that variable anymore.
Also cleaned up some whitespace, and moved an init function to the top
of the file for visibility.