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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user