Final Toml-Path Solution

* Refactored type names and file names to mesh with existing TOML library more closely
* Added QueryResult structure that provides values and position data
* Added Query() method to TomlTree type
* Tests, tests, and more tests
* Fixed bug where positions returned from some tables were invalid
* Added test case for bug patch

The bugfix was an interesting case. Position information wasn't being
set in cases where createPath was called.  So table names like [foo.bar]
would result in table 'foo' having no position.
This commit is contained in:
eanderton
2014-09-10 21:32:04 -04:00
parent 2811a1a3c9
commit 081f3db916
15 changed files with 713 additions and 779 deletions
-3
View File
@@ -21,11 +21,8 @@ go build -o toml-test github.com/BurntSushi/toml-test
mkdir -p src/github.com/pelletier/go-toml/cmd
cp *.go *.toml src/github.com/pelletier/go-toml
cp cmd/*.go src/github.com/pelletier/go-toml/cmd
mkdir -p src/github.com/pelletier/go-toml/jpath
cp jpath/*.go src/github.com/pelletier/go-toml/jpath
go build -o test_program_bin src/github.com/pelletier/go-toml/cmd/test_program.go
# Run basic unit tests and then the BurntSushi test suite
go test -v github.com/pelletier/go-toml/jpath
go test -v github.com/pelletier/go-toml
./toml-test ./test_program_bin | tee test_out