general

package
v0.0.0-...-9cd5bee Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package general provides functions that apply to multiple project types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PropertiesToList

func PropertiesToList(flatProperties *properties.Map, key string) map[string]interface{}

PropertiesToList parses a property that has a list data type and returns it in the map[string]interface{} type consumed by the JSON schema parser.

func PropertiesToMap

func PropertiesToMap(flatProperties *properties.Map, levels int) map[string]interface{}

PropertiesToMap converts properties.Map data structures to map[string]interface with the specified number of key levels. The Arduino project configuration fields have an odd usage of the properties.Map format. Dots may sometimes indicate nested keys, but in other cases they are merely a character in the key string. There are cases where a completely programmatic recursion of the properties into a fully nested structure would result in the impossibility of some keys having both a string and a map type, which is not supported. For this reason, it's necessary to manually configure the recursion of key levels on a case-by-case basis. In the event a full recursion of key levels is desired, set the levels argument to a value <1.

Types

This section is empty.

Jump to

Keyboard shortcuts

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