登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
Gitee AI
NEW
我知道了
查看详情
登录
注册
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
1
Star
0
Fork
0
systechn
/
toml
代码
Issues
0
Pull Requests
0
Wiki
统计
流水线
服务
Gitee Pages
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
我知道了,不再自动展开
标签
标签名
描述
提交信息
操作
v1.0.0
Tag release v1.0.0 This release adds much more detailed errors, support for the `toml.Marshaler` interface, and several fixes. There is no special meaning in the jump to v1.0; the 0.x releases were always treated as if they're 1.x with regards to compatibility; the versioning scheme for this library predates the release of modules. New features ------------ - Error reporting is much improved; the reported position of errors should now always be correct and the library can print more detailed errors (#299, #332) Decode always return a `toml.ParseError`, which has three methods: - `Error()` behaves as before and shows a single concise line with the error. - `ErrorWithLocation()` shows the same error, but also shows the line the error occurred at, similar to e.g. clang or the Rust compiler. - `ErrorWithUsage()` is the same as `ErrorWithPosition()`, but may also show a longer usage guidance message. This isn't always present (in which case it behaves identical to `ErrorWithPosition()`), but it should be present for most common mistakes and sources of confusion. Which error the correct one to use is depends on your application and preferences; in general I would recommend using at least `ErrorWithPosition()` for user-facing errors, as it's much more helpful for users of any skill level. If your users are likely to be non-technical then `ErrorWithUsage()` is probably a good idea; I did my best to avoid technical jargon such as "newline" and phrase things in a way that's understandable by most people not intimately familiar with these sort of things. Additionally, the TOML key that fialed should now always be reported in all errors. - Add `toml.Marshaler` interface. This can be used if you want full control over how something is marshalled as TOML, similar to `json.Marshaler` etc. This takes precedence over `encoding.TextMarshaler`. (#327) - Allow TOML integers to be decoded to a Go float (#325) Previously `int = 42` could only be decoded to an `int*` type; now this can also be decoded in a `float` type as long as it can be represented without loss of data. Fixes ----- - Key.String() is now quoted when needed (#333) - Fix decoding of nested structs on 32bit platforms (#314) - Empty slices are now always `[]T{}` rather than nil, which was the behaviour in v0.3.1 and before. While they are identical for most purposes, encoding/json encodes them different (`[]` vs. `null`), making it an (accidentally) incompatible change (#339)
4272474
2022-01-12 14:49
下载
v0.4.1
Release v0.4.1 This fixes a cyclic module dependency issue with github.com/BurntSushi/toml-test that prevented some people from updating. See #313 for some details.
641c3cf
2021-08-05 16:14
下载
v0.4.0
Tag release v0.4.0 After some time of inactivity this package is now maintained again. This release should support alll of TOML 1.0 and has various bugfixes and a few small improvements. This requires Go 1.13 or newer; older Go versions will no longer work. TOML 1.0 support ---------------- Previously this library implemented TOML 0.3; now all of TOML 1.0 is supported: - Support dotted keys (`a.b = 1`, `a = {b.c = 2}`). - Mixed arrays: in previous TOML versions array values all had to be of the same type; you can now freely mix types, including inline tables. - Support hex (`0x2f9a`), binary (`0b0110`), and octal (`0o777`) literals, and support `nan` and `inf` for floats. - Support local datetimes, dates, and times. These are dates and times without a timezone and are parsed in the local timezone. - Allow accidental whitespace between backslash and newline in the line continuation operator in multi-line basic strings. There should be no incompatibilities as such; all existing *valid* TOML files should continue to work. However, the parser previously allowed the following invalid values: - It would allow literal control characters in strings. - It would allow leading zeroes in decimal ints and floats. Neither of these was ever valid TOML, and are explicitly forbidden by the specification. But the library erroneously permitted them. Other changes ------------- - Set up Go modules. - Allow escaping the `\`, and allow triple-quotes strings to end with a quote (e.g. `x="""x""""`). - All control characters inside strings are properly escaped when encoding. - Support encoding nested anonymous structs. - Encode toml.Primitive values. - You get a more helpful error on UTF-16 files (probably the most common non-UTF-8 compatible encoding). Also read over UTF-16 BOM in UTF-8 files. - Call `MarshalText` and `UnmarshalText` consistently on all types; before this didn't always happen in some cases. - Allow empty quoted keys (`"" = 1`); silly, but explicitly mentioned as valid. - Don't panic in encoder on unsupported types; return an error instead. - Don't panic on unclosed inline arrays. - Add `Decoder` and deprecate `DecodeReader()`; this is more consistent with how other decoders tend to work and allows adding decoding options. - Add `DecodeFS()` for Go 1.16 or newer. - Avoid creating new functions/allocations in lexSkip; small performance improvement.
642b87a
2021-08-02 15:59
下载
v0.3.1
Tag release 0.3.1
3012a1d
2018-08-15 18:47
下载
v0.3.0
b26d9c3
2017-03-28 14:15
下载
v0.2.0
Tag v0.2.0
bbd5bb6
2016-03-09 10:19
下载
v0.1.0
2ceedfe
2014-07-18 06:38
下载
下载
请输入验证码,防止盗链导致资源被占用
取消
下载
Go
1
https://gitee.com/systechn/toml.git
git@gitee.com:systechn/toml.git
systechn
toml
toml
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册