
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
git.1-hub.cn/loov/layout
Current version and API is in experimental stage. Property names may change.
The graph layouting can be used as a command-line tool and as a library.
To install the command-line tool:
go get -u github.com/loov/layout/cmd/glay
To install the package:
go get -u github.com/loov/layout
Basic usage:
package main
import (
"os"
"github.com/loov/layout"
"github.com/loov/layout/format/svg"
)
func main() {
graph := layout.NewDigraph()
graph.Node("A")
graph.Node("B")
graph.Node("C")
graph.Node("D")
graph.Edge("A", "B")
graph.Edge("A", "C")
graph.Edge("B", "D")
graph.Edge("C", "D")
graph.Edge("D", "A")
layout.Hierarchical(graph)
svg.Write(os.Stdout, graph)
}
Currently the layout.Hierarchy
algorithm output is significantly worse than graphviz. It is recommended to use graphviz dot
, if possible.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.