tomlutil

package
v1.9.0-test Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTOMLFile

func CreateTOMLFile(path string, sections map[string]map[string]interface{}) error

CreateTOMLFile creates a new TOML file with the given sections if it doesn't exist. If the file already exists, it does nothing.

func GetTOMLSection

func GetTOMLSection(path string, sectionName string) (map[string]interface{}, error)

GetTOMLSection reads a TOML file and returns a specific section.

func ReadTOML

func ReadTOML(path string, v interface{}) error

ReadTOML reads a TOML file and unmarshals it into the provided interface.

func UpdateTOMLSection

func UpdateTOMLSection(path string, sectionName string, updates map[string]interface{}) error

UpdateTOMLSection updates a specific section in a TOML file. If the section doesn't exist, it will be created.

func WriteTOML

func WriteTOML(path string, v interface{}) error

WriteTOML marshals the provided interface and writes it to a TOML file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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