utils

package
v0.0.0-...-d4f785a Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatInt

func FormatInt(num int) string

func GetLocalIp

func GetLocalIp() string

func JsonToStruct

func JsonToStruct()

func MapToJson

func MapToJson()

Types

type NodeItem

type NodeItem struct {
	Id     uint
	Label  string
	Pid    uint
	Status bool
}

type NodeList

type NodeList []NodeItem

func (NodeList) ToMap

func (l NodeList) ToMap() map[uint]NodeItem

type NodeTree

type NodeTree struct {
	NodeItem
	Children []*NodeTree
}

func BuildTree

func BuildTree(nodes []NodeItem) []*NodeTree

func BuildValidTree

func BuildValidTree(nodes []NodeItem) []*NodeTree

func BuildValidTreeWithOption

func BuildValidTreeWithOption(nodes, validNodes NodeList) []*NodeTree

Jump to

Keyboard shortcuts

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