package toml

import "cuelang.org/go/encoding/toml"

Package toml converts TOML to and from CUE.

WARNING: THIS PACKAGE IS EXPERIMENTAL. ITS API MAY CHANGE AT ANY TIME.

Index

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

Decoder implements the decoding state.

Note that TOML files and streams never decode multiple CUE nodes; subsequent calls to Decoder.Decode may return io.EOF.

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder creates a decoder from a stream of TOML input.

func (*Decoder) Decode

func (d *Decoder) Decode() (ast.Node, error)

Decode parses the input stream as TOML and converts it to a CUE *ast.File. Because TOML files only contain a single top-level expression, subsequent calls to this method may return io.EOF.

Source Files

decode.go

Version
v0.10.0-0.dev
Published
Jun 6, 2024
Platform
windows/amd64
Imports
7 packages
Last checked
55 minutes ago

Tools for package owners.