874 Commits

Author SHA1 Message Date
Thomas Pelletier 3616783228 Run go vet as part of the test suite (#132)
* Run go vet as part of the test suite
2017-02-27 14:29:04 -08:00
Thomas Pelletier d0ec4317d3 Fix compatibility with latest go-buffruneio (#131) 2017-02-27 14:18:12 -08:00
Thomas Pelletier 22139eb546 Test with go 1.8 (#129) 2017-02-16 17:27:36 -08:00
Thomas Pelletier c9506ee963 Update license (#128)
* Update LICENSE badge
* Update license year to 2017
2017-02-09 13:38:35 -08:00
David Brown 3a6d01f7a0 Fix syntax errors in package-level documentation (#126) 2017-02-09 13:23:28 -08:00
Thomas Pelletier d1fa2118c1 Bump test go to 1.7.5 (#127)
* Bump test go to 1.7.5
* Use travis container infrastructure
* Don't run the tests twice on PRs
2017-02-03 13:36:21 -08:00
Thomas Pelletier a1f048ba24 Make ToString() return an error instead of panic (#117)
Fixes #100
2017-01-15 18:49:11 -08:00
Jordan Bach ee2c0b51cf Fix typo in README tomljson installation instructions (#125) 2017-01-15 18:48:04 -08:00
Thomas Pelletier 439fbba1f8 Make lexComment jump back to the previous state (#122)
When a comment appears in an rvalue, the lexer needs to jump back to
lexRValue, not to lexVoid.

Fixes #120.
2016-12-29 19:51:04 +01:00
Christopher Mancini 017119f7a7 Use a single line for slice encoding (#119) 2016-12-13 15:20:06 +01:00
Thomas Pelletier ce7be745f0 Rename group to table (#115)
* Rename Group to Table Fixes #45 
* Change fmt.Errorf to errors.new for simple strings
2016-12-03 12:32:16 +01:00
Thomas Pelletier d464759235 Bump test go patchlevels (#113)
* 1.6.4
* 1.7.4
v0.4.0
2016-12-02 11:42:58 +01:00
Thomas Pelletier 7cb988051d Make values come before tables in ToString output (#111)
If no order on the key is enforced in ToString, the following tree:

foo = 1
bar = "baz"
foobar = true
[qux]
  foo = 1
  bar = "baz"

may come out as:

bar = "baz"
foobar = true
[qux]
  foo = 1
  bar = "baz"
foo = 1

which is incorrect, since putting that back to the parser would panic
because of a duplicated key (qux.foo). Those changes make sure that
leaf values come before tables in the ToString output.
2016-11-23 16:24:52 +01:00
Thomas Pelletier 3ddb37c944 Fix []*Toml.Tree being wrapped in *Toml.Value (#110)
Nodes can be either *Toml.Tree, []*Toml.Tree, or *Toml.Value.
Arrays of trees were incorrectly wrapped in a *Toml.Value,
making the conversion functions think they were leaf nodes.
2016-11-23 15:48:39 +01:00
Thomas Pelletier f7f14983c3 Update travis to go1.7.3 (#109) 2016-11-23 15:21:57 +01:00
Cameron Moore 45932ad32d Handle nil, map[string]string, and map[interface{}]interface{} input (#103)
* Handle map[string]string and map[interface{}]interface{} input
* Handle nil values

Fixes #99
2016-09-20 09:07:15 +02:00
Cameron Moore 67b7b944a8 Support all numeric type conversions (#102)
Fixes #101
2016-09-20 09:04:39 +02:00
Thomas Pelletier 31055c2ff0 Allow empty quoted keys (#97) 2016-09-06 22:25:57 +02:00
Cameron Moore 5a62685873 Add license and Go Report Card badges to README (#93) 2016-08-23 09:47:07 +02:00
Cameron Moore d05a14897c Fix typo in comment (#94) 2016-08-23 09:46:25 +02:00
Cameron Moore 0599275eb9 Simplify redundant types in literals (#95)
Using `gofmt -s`
2016-08-23 09:45:54 +02:00
Cameron Moore 0049ab3dc4 Update Travis build (#89)
* Test with the latest releases.
* Allow tip to fail.
2016-08-22 14:27:12 +02:00
Cameron Moore bfe4a7e160 Fix gofmt and golint issues (#90) 2016-08-22 11:20:25 +02:00
Thomas Pelletier e6271032cc Move license to LICENSE file (#91) 2016-08-22 11:17:53 +02:00
Cameron Moore 887411a2a8 Add \U support to query lexer (#88) 2016-08-22 10:55:12 +02:00
Thomas Pelletier 31c735e72c Test with go 1.7. Stop testing with 1.4 (#87) 2016-08-16 14:03:31 +02:00
Thomas Pelletier 06484b677b Fix ToMap conversion of array of tables (#83) 2016-08-15 21:00:14 +02:00
Thomas Pelletier de2e921d55 TOML to JSON cli tool (#85)
* Implement tomljson
* Add note about tools in README
2016-08-14 13:50:18 +02:00
Thomas Pelletier 7f292800de Target latest Go patch level in Travis (#80) 2016-07-25 09:41:11 +02:00
Sam Broughton 923742e542 Fix String() comment (#79) 2016-07-22 09:53:40 +02:00
Sam Broughton 65ad89c1a7 Pointer cleanup (#78)
Remove unnecessary pointer receivers for Position and QueryResult
2016-07-21 16:42:51 +02:00
Thomas Pelletier 64ff1ea4d5 Don't hang when reading an invalid rvalue (#77)
Fixes #76
v0.3.5
2016-06-30 16:21:25 +02:00
Sam Broughton b39f6ef1f9 Add a toml linter (#74)
* Add a toml linter

* Use if/else instead of os.Exit(0)

* Add usage warning about destructive changes
2016-06-06 12:29:13 +02:00
Sam Broughton c187221f01 Implement fmt.Stringer and alias ToString (#73) 2016-06-06 10:23:55 +02:00
Thomas Pelletier 8e6ab94eec Fix inline tables parsing
Inline tables were wrapped inside a TomlValue, although they should
just be part of the tree.
v0.3.4
2016-04-22 17:38:16 +02:00
Thomas Pelletier 8d9c606c69 Improve test coverage (#66) 2016-04-22 14:26:15 +02:00
Thomas Pelletier 288bc57940 Better logging for parser tests (#65)
* Better logging for parser tests

* Add spew to tests deps list
2016-04-22 11:01:31 +02:00
Thomas Pelletier e3b2497729 TomlTree.ToMap (#59)
* Extract TomlTree conversion to its own file

* Implement ToMap

* Reorder imports in tomltree_conversions
2016-04-22 09:46:28 +02:00
Thomas Pelletier 1a8565204c Fix multiline strings (#62) 2016-04-21 17:47:41 +02:00
Thomas Pelletier e58cfd32d4 Bump to golang 1.6.2 on Travis 2016-04-21 09:22:47 +02:00
Cameron Moore a2ae216b47 Add more token tests (#58) 2016-04-19 09:43:26 +02:00
Thomas Pelletier 8645be8dc7 Merge pull request #57 from moorereason/simplify
Fix a couple issues found by gosimple
2016-04-19 09:41:51 +02:00
Cameron Moore 99b9371c53 Use strings.ContainsRune instead of IndexRune 2016-04-18 17:14:57 -05:00
Cameron Moore 92c565e02b Use literal string for regexp pattern 2016-04-18 17:14:18 -05:00
Cameron Moore 6e26017b00 Clean up lint (#56)
The only real change in this commit is that MaxInt is made private.
Everything else should be gofmt'ing, docs and cleanup of lint.
2016-04-18 16:58:23 +02:00
Thomas Pelletier 9d93af61de Add couple tests 2016-04-18 16:46:44 +02:00
Thomas Pelletier 4d8fb95ffe Update coveralls badge 2016-04-18 10:02:19 +02:00
Thomas Pelletier 0e41db2176 Update documentation for Query
Fix #54
2016-04-18 09:51:42 +02:00
Thomas Pelletier afca7f3334 Hardcode Go versions in .travis.yml 2016-04-13 09:23:15 +02:00
Thomas Pelletier d6a90e60ed Fix #52: query matcher doesn't handle arrays tables
Also improve coverage of query matcher.
2016-03-16 09:56:04 -07:00