Code Monkey home page Code Monkey logo

toml's People

Contributors

komkom avatar sbellem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

sbellem

toml's Issues

TestSpecTests_invalid fails

TestSpecTests_invalid fails on Debian unstable (on every architecture):

=== RUN   TestSpecTests_invalid
--- FAIL: TestSpecTests_invalid (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x1fd30c]

goroutine 24 [running]:
testing.tRunner.func1.2({0x22ae00, 0x3bcde0})
	/usr/lib/go-1.18/src/testing/testing.go:1389 +0x27c
testing.tRunner.func1()
	/usr/lib/go-1.18/src/testing/testing.go:1392 +0x3f4
panic({0x22ae00, 0x3bcde0})
	/usr/lib/go-1.18/src/runtime/panic.go:838 +0x23c
github.com/komkom/toml.TestSpecTests_invalid.func1({0x250adb, 0x18}, {0x0, 0x0}, {0x29aed0, 0x14f1698})
	_build/src/github.com/komkom/toml/reader_test.go:300 +0x38
path/filepath.Walk({0x250adb, 0x18}, 0x142f788)
	/usr/lib/go-1.18/src/path/filepath/path.go:515 +0x6c
github.com/komkom/toml.TestSpecTests_invalid(0x1482b40)
	_build/src/github.com/komkom/toml/reader_test.go:297 +0x74
testing.tRunner(0x1482b40, 0x25fb8c)
	/usr/lib/go-1.18/src/testing/testing.go:1439 +0x118
created by testing.(*T).Run
	/usr/lib/go-1.18/src/testing/testing.go:1486 +0x3a0

Hexadecimal numbers are converted as strings

TOML specifies that numbers starting by 0x are hexadecimal, but this package deals with them as strings. For example:

[hextest]
hexvalue=0x10
decvalue=16

gets rendered in JSON as

{
   "hextest": {
      "hexvalue": "0x10",
      "decvalue": 16
   }
}

I think it should be

{
   "hextest": {
      "hexvalue": 16,
      "decvalue": 16
   }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.