GitShow/BurntSushi/toml
BurntSushi

toml

TOML parser for Golang with reflection.

by BurntSushi
Star on GitHubFork

Go

5.0k stars558 forks62 contributorsActive · 1mo agoSince 2013v1.6.0MIT

Meet the team

See all 62 on GitHub →
arp242
arp242225 contributions
BurntSushi
BurntSushi149 contributions
cespare
cespare46 contributions
sqs
sqs21 contributions
kkHAIKE
kkHAIKE7 contributions
rjeczalik
rjeczalik5 contributions
ttacon
ttacon3 contributions
spf13
spf133 contributions

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 5 commits

Full graph →

Community health

3 of 6 standards met

Community profile →
57
✓README✓License✓Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · 7 in progress · Last activity 1mo ago
See all on GitHub →
ef0xa
Panic in `.ParseError.ErrorWithPosition` when dealing with strings containing windows newlinesOpenIssue

Was working with your library for a personal project and was running for ten minutes and popped up a failure. I'm running on the latest commit of : on . I've created a minimal test that reproduces the problem (with, in retrospect, a terrible name). Seems to be a problem with quoted strings containing windows newlines.

ef0xa · 2w ago
lzap
No way of skipping a field when marshalingOpenIssue

Hello, I need my custom method to be able to omit a field completely when it is set to but it does not appear to be possible. It must not return. that is an error, there is no special error value for omitting a field, returning an empty buffer creates an invalid TOML: My type implements the Go 1.24 newly added method but I guess that is something that is not supported in this library. That could be perhaps a solution. Is there a solution? I do not have access to the script that encapsulates the type. Thanks.

lzap · 1mo ago

Recent fixes

View closed PRs →
team-humaki
error: don't panic ErrorWithPosition on CR newlinesMergedPR

Quoted strings with a newline on the first line (including Windows ) called , which decremented from 1 to 0. then indexed . Keep at 1 when the error is still on the first line, and clamp the snippet indexes in . Fixes #517

team-humaki · 2d ago
team-humaki
Fix ErrorWithPosition panic on CRLF/bare-CR in stringsMergedPR

Fixes #517. always did , but only bumps the line on . For a CRLF/bare-CR newline inside a string on line 1 that drove to 0 and panicked in with . Only decrement when the consumed byte was (same idea as ). Added covering LF/CRLF in basic and literal strings.

team-humaki · 1w ago
jupe26905
Proposal: Polymorphic decoding with TypeProviderClosedIssue

Proposal I would like to propose an opt-in mechanism for decoding polymorphic TOML tables based on a type discriminator. For example: could be represented as: With: And: Motivation The important part is that the concrete type can be resolved before decoding the table. Instead of: the decoder can do: This avoids decoding the same data twice and allows the existing TOML decoder to handle all fields normally. The resolver only determines the destination type; the existing decoder remains responsible for decoding the contents. The behavior would be explicitly opt-in through TypeProvider, leaving existing decoding behavior unchanged. I would be interested in feedback on whether this API fits the library and whether there is a preferred way to integrate the type-resolution step into the existing decoder.

jupe26905 · 1w ago
Structured data for AI agents

Repository: BurntSushi/toml. Description: TOML parser for Golang with reflection. Stars: 5005, Forks: 558. Primary language: Go. Languages: Go (100%). License: MIT. Latest release: v1.6.0 (9mo ago). Open PRs: 7, open issues: 20. Last activity: 1mo ago. Community health: 57%. Top contributors: arp242, BurntSushi, cespare, sqs, kkHAIKE, rjeczalik, ttacon, spf13, sahvx655-wq, martinlindhe and others.

·@ofershap

Replace github.com with gitshow.dev