gosrc

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendTreeAfter

func AppendTreeAfter(parentTreeNode *Tree, parent string, new *Tree)

func CalculateDepthHeight

func CalculateDepthHeight(root *Tree) (depth uint32, width uint32)

func CheckTcpConnect

func CheckTcpConnect(host string, port string) (err error)

func FindTreeRoute

func FindTreeRoute(key string) (route []uint32)

func GetGoModGraph

func GetGoModGraph() string

func GetUnUsePort

func GetUnUsePort() uint32

func InsertTreeRoute

func InsertTreeRoute(newTree *Tree, keys []uint32)

func OpenBrowser added in v0.5.2

func OpenBrowser(targetUrl string) (err error)

open browser with url

Types

type Link struct {
	Source uint32 `json:"source"`
	Target uint32 `json:"target"`
	Weight uint32 `json:"weight"`
	Width  uint32 `json:"width"`
}
func GraphToNodeLinks(graph string) (nodes map[string]Node, links []Link)

type Node

type Node struct {
	Id    uint32 `json:"id"`
	Name  string `json:"name"`
	Value uint32 `json:"value"`
}

type RouteNode

type RouteNode struct {
	Id    uint32   `json:"id"`
	Name  string   `json:"name"`
	Value uint32   `json:"value"`
	Route []uint32 `json:"-"`
}

func GetRouteNode

func GetRouteNode(key string) *RouteNode

type Tree

type Tree struct {
	Id       uint32  `json:"-"`
	Name     string  `json:"name"`
	Value    uint32  `json:"value"`
	Children []*Tree `json:"children"`
}

func BuildTree

func BuildTree(graph string) (root *Tree, depth uint32, width uint32, repeatDependNodes map[string]*Tree)

func GetNodeByKeys added in v0.5.0

func GetNodeByKeys(tree []*Tree, keys []uint32) (re *Tree)

Jump to

Keyboard shortcuts

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