JuliaLang / TOML.jl

A fast TOML parser for TOML 1.0 written in Julia
MIT License
34 stars 15 forks source link

Docs example for writing to file doesn't actually give an example to write to file #18

Closed anandijain closed 3 years ago

anandijain commented 3 years ago

This should probably have an example like

open("myfile.toml", "w") do io
           TOML.print(io, dict)
end
KristofferC commented 3 years ago

The docstring makes it obvious (https://docs.julialang.org/en/v1.7-dev/stdlib/TOML/#TOML.print) but adding something in the example makes sense, yes.

jaakkor2 commented 3 years ago

The header in https://docs.julialang.org/en/v1.7-dev/stdlib/TOML/#Exporting-data-to-TOML-file explicitely suggests about Exporting-data-to-TOML-file.

Now the example has an unused line

fname = tempname();