toml

package
v0.0.0-...-31017a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(_ []string, stdin io.Reader) error
Example
package main

import (
	"fmt"
	"os"
	"strings"

	"github.com/frioux/leatherman/internal/tool/allpurpose/toml"
)

func main() {
	r := strings.NewReader("foo = \"bar\"\n")

	err := toml.ToJSON(nil, r)
	if err != nil {
		fmt.Fprintf(os.Stderr, "Couldn't ToJSON: %s\n", err)
		os.Exit(1)
	}
}
Output:

{"foo":"bar"}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL