Gregory Oschwald
3229a0abfb
Decode: convert table key to correct type ( #741 )
...
Fixes #740 .
2022-03-02 09:24:01 -05:00
Thomas Pelletier
3f5d8a6b06
Mention removal of go-toml/query ( #736 )
...
Fixes #722
2022-01-07 18:58:33 -05:00
Cameron Moore
146f70ea8a
Decode: use cleaned byte slice throughout parseFloat ( #735 )
...
Fixes #734
2022-01-06 14:34:27 -05:00
Thomas Pelletier
e83cf535f5
Decoder: rename SetStrict to DisallowUnknownFields ( #731 )
2022-01-02 14:32:34 -05:00
Thomas Pelletier
c3ba3ef97a
readme: add docker image
2022-01-01 09:53:14 -05:00
Thomas Pelletier
7ee3c8ff25
build: login to github repository
2022-01-01 09:24:52 -05:00
Thomas Pelletier
1e85aa6d78
build: add contents permissions
2021-12-31 20:47:50 -05:00
Thomas Pelletier
46fa3225e2
build: allows the token to write packages
2021-12-31 20:25:11 -05:00
Thomas Pelletier
4d51831dab
build: replace grc.io with ghcr.io
2021-12-31 20:10:36 -05:00
Thomas Pelletier
5a1a96cb2d
build: pass the github token to goreleaser
2021-12-31 20:03:18 -05:00
Thomas Pelletier
ea9040ae83
build: change workflow reference to v2
2021-12-31 19:57:41 -05:00
Thomas Pelletier
2373685f1e
Docker + goreleaser ( #729 )
2021-12-31 19:55:31 -05:00
Thomas Pelletier
f1391952d4
Update and move testsuite to internal package ( #730 )
...
* Regenerate test suite
* Move test suite to /internal
2021-12-31 18:52:26 -05:00
Thomas Pelletier
4a73a200ed
Clean up tools godoc
2021-12-31 15:56:40 -05:00
Thomas Pelletier
4807229e94
tomll: port to v2 ( #727 )
...
Fixes #721
2021-12-31 15:40:18 -05:00
Thomas Pelletier
d8ddc00c61
jsontoml: port to v2 ( #726 )
...
Fixes #719
2021-12-31 14:40:20 -05:00
Thomas Pelletier
82f8dad811
tomljson: port to v2 ( #725 )
2021-12-31 13:25:53 -05:00
Thomas Pelletier
75db1016e8
Remove extra words from CONTRIBUTING
2021-12-29 10:26:22 -05:00
Thomas Pelletier
de6d715bd2
Update CONTRIBUTING.md
2021-12-29 10:25:28 -05:00
Thomas Pelletier
3ab2fc2b87
Update release proces documentation
2021-12-29 10:24:01 -05:00
Thomas Pelletier
1b1dd3d6d5
Exclude testing PRs from release notes
v2.0.0-beta.5
2021-12-29 09:53:43 -05:00
Cameron Moore
128b7a8bfb
Decode: check buffer length before parsing simple key ( #717 )
...
Fixes #714
2021-12-29 08:58:42 -05:00
Cameron Moore
892df5c28e
Decode: fix index out of range bug ( #716 )
...
Fixes #715
2021-12-29 08:49:33 -05:00
Thomas Pelletier
d58eb50ebf
Doc: clarify errors returned by Decode ( #713 )
...
Fixes #625
2021-12-26 20:04:09 +01:00
Thomas Pelletier
535fc65c5f
Fix link in README
2021-12-26 19:49:35 +01:00
Thomas Pelletier
f158d7d278
Readme: document more differences with v1 ( #712 )
...
* Readme: document more changes with v1
Closes #552
2021-12-26 19:47:03 +01:00
Thomas Pelletier
5fd6e9cce0
Encode: add comment struct tag ( #711 )
...
Similar to v1, add a `comment` struct that that makes the encoder emit a comment
before the annotated element, if permitted. Unlike v1, comments are compact by
default (and cannot be changed).
Fixes #595 .
2021-12-26 18:29:46 +01:00
Thomas Pelletier
8ce5c3d78f
Decoder: time allows extra precision ( #710 )
...
As discussed[1], this change allows times to provide precision beyond the
nanosecond (nine digits fractional part). Extra precision is truncated according
to the TOML specificiation.
[1]: https://github.com/pelletier/go-toml/discussions/707
2021-12-26 17:05:10 +01:00
Thomas Pelletier
177b4a5e53
Decode: allow \r\n as line whitespace before \ ( #709 )
...
Fixes #708
2021-12-26 16:38:15 +01:00
Cameron Moore
5cbdea6192
decode: fix maximum time offset values ( #706 )
...
According to RFC3339 section 5.6, the maximum time offset values for
hours and minutes is 23 and 59, respectively.
2021-12-22 10:29:52 +01:00
Thomas Pelletier
696dd25c17
Decoder: disallow modification of existing table ( #704 )
...
Fixes #703
2021-12-15 11:05:27 -05:00
Thomas Pelletier
facb2b13e8
Decoder: prevent modification of inline tables ( #702 )
...
Fixes #701
2021-12-12 09:43:42 -05:00
Cameron Moore
8bbb519477
Decode: ensure signed exponents don't start with an underscore ( #699 )
2021-12-05 20:02:19 -05:00
Cameron Moore
b37e11d74d
Decode: allow maximum seconds value of 60 ( #700 )
...
RFC3339 allows seconds to be 60 when adding leap seconds
2021-12-05 20:00:42 -05:00
Cameron Moore
6cd86876b8
Decode: ensure signed numbers don't start with an underscore ( #698 )
2021-12-04 16:56:48 -05:00
Cameron Moore
f53bc740c1
Decode: restrict timezone offset values ( #696 )
...
Don't allow hours greater than 24 and minutes greater than 60 per RFC
3339.
2021-12-02 18:59:32 -05:00
Thomas Pelletier
9bf9be681e
Decoder: check for invalid chars in timezone ( #695 )
...
Fixes #694
2021-12-02 09:00:20 -05:00
Thomas Pelletier
c862c344b3
Decoder: allow commas in tags ( #693 )
2021-11-30 21:59:22 -05:00
Thomas Pelletier
0d20a84523
Encoder: omitempty flag ( #692 )
...
Fixes #597
2021-11-30 21:32:28 -05:00
Thomas Pelletier
3990899d7e
Decoder: check tz has : between hours and minutes ( #691 )
...
Fixes #690
2021-11-30 20:22:11 -05:00
Cameron Moore
4c7a337083
Decoder: fix typo in test description ( #689 )
2021-11-30 15:28:01 -05:00
Thomas Pelletier
bbaae540ce
Decoder: check timezones start with +,-,z,Z ( #688 )
...
Also simplifies local time seconds scanning.
Fixes #686
2021-11-30 13:01:15 -05:00
Thomas Pelletier
ede6445608
Decoder: flag bad \r in literal multiline strings ( #687 )
...
Fixes #685
2021-11-30 10:44:48 -05:00
Thomas Pelletier
b226db6a29
Decoder: show struct field in type mismatch errors ( #684 )
...
The goal is to provide some context as to why the type were mismatched. This
change only works for that case, on structs. This is the same a encoding/json. A
more general solution would be great, but this would require a broader change in
the decoder, which I don't think is necessary at the moment.
Fixes #628
2021-11-24 20:43:56 -05:00
Thomas Pelletier
d8997efb5a
Mention "-" to prevent encoding field in doc ( #683 )
2021-11-24 19:52:23 -05:00
Thomas Pelletier
79e78b234c
Decoder: fix panic on table array behind a pointer ( #682 )
...
Fixes #677
2021-11-24 18:50:04 -05:00
Thomas Pelletier
1b5a25c0ef
Decoder: fail on unescaped \r not followed by \n ( #681 )
...
Fixes #674
2021-11-24 18:11:36 -05:00
Thomas Pelletier
8eae15b2ee
Decoder: validate bounds of day and month in dates ( #680 )
...
Fixes #676
2021-11-24 17:42:01 -05:00
Thomas Pelletier
2b3de620e8
Encoder: try to use pointer type TextMarshaler ( #679 )
...
If a type does not implement the encoding.TextMarshaler interface but
its pointer type does, use it if possible.
Fixes #678
2021-11-24 14:43:49 -05:00
Cameron Moore
8645d6376b
Decoder: flag invalid carriage returns in literal strings ( #673 )
2021-11-23 22:41:59 -05:00