* Remove date regexp
Hand-roll the date matching logic to avoid trying to match a regexp on
every integer.
```
benchmark old ns/op new ns/op delta
BenchmarkUnmarshalToml-8 293449 272134 -7.26%
benchmark old allocs new allocs delta
BenchmarkUnmarshalToml-8 2746 2650 -3.50%
benchmark old bytes new bytes delta
BenchmarkUnmarshalToml-8 133604 127548 -4.53%
```
* Remove fuzzit
The company has been acquired by GitLab and shutting down.
A bug was reported that indicated that inline tables did not fully support bare keys:
$ echo 'foo = { -bar => "buz"}' | ./tomljson
(1, 9): unexpected token type in inline table: Error
$ echo 'foo = { "whatever" = "buz"}' | ./tomljson
(1, 10): unexpected token type in inline table: String
echo 'foo = { _no = "buz"}' | ./tomljson
(1, 9): unexpected token type in inline table: Error
This change makes a couple of tweaks to to allow for all key variants in inline tables
Fixes: #282
Patch #185 introduced a backward incompatibility by changing the arguments
of the `Set*` methods on `Tree`.
This change restores the arguments to what they previous were, and
introduces `SetWithComment` and `SetPathWithComment` to perform the same
action.
Add support for non-decimal integers. At the time of writing, this is an
unreleased backward-compatible feature of TOML:
```
Non-negative integer values may also be expressed in hexadecimal, octal, or
binary. In these formats, leading zeros are allowed (after the prefix). Hex
values are case insensitive. Underscores are allowed between digits (but
not between the prefix and the value).
# hexadecimal with prefix `0x`
hex1 = 0xDEADBEEF
hex2 = 0xdeadbeef
hex3 = 0xdead_beef
# octal with prefix `0o`
oct1 = 0o01234567
oct2 = 0o755 # useful for Unix file permissions
# binary with prefix `0b`
bin1 = 0b11010110
```
Fixes#204
A new Encoder option emits arrays with more than one line on multiple lines.
This is off by default and toggled with `ArraysWithOneElementPerLine`.
For example:
```
A = [1,2,3]
```
Becomes:
```
A = [
1,
2,
3
]
```
Fixes#200
* Make TreeFromMap reflect to construct tree
* Fix wording of invalid value type in writeTo
Fixes#138, #139, #134⚠️ TreeFromMap signature changed to `TreeFromMap(map[string]interface{}) (*TomlTree, error)`