Documentation
¶
Overview ¶
nodestates/nodestates.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNodeExpanded ¶
IsNodeExpanded checks if the node at the given index is true (expanded) based on a JSON string representation of node states. The nodeStatesJSON string can be empty (""), which is treated as an empty list of states. If the index is out of bounds for the deserialized states, it returns false.
func ToggleNodeExpanded ¶
ToggleNodeExpanded changes the state of the node at the given index. The nodeStatesJSON is a pointer to a string containing the JSON array of booleans. If the string is empty (""), it's treated as an empty list. If the index is out of bounds, the list of states is automatically expanded with 'false' values up to the required index before toggling. The string pointed to by nodeStatesJSON is updated with the new JSON state.
Types ¶
This section is empty.