Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
func HTML(pkgpath metadata.PackagePath) []byte
HTML returns the HTML for the main "Split package" page, for the /splitpkg endpoint. The real magic happens in JavaScript; see ../../server/assets/splitpkg.js.
func JSON ¶
JSON returns the JSON encoding of the data needed by the /splitpkg-json endpoint for the specified package. It includes:
- the set of names declared by the package, grouped by file;
- the set of components and their assigned declarations from the most recent call to UpdateComponentsJSON; and
- the component graph derived from them, along with the sets of reference that give rise to each edge.
Types ¶
type ComponentsJSON ¶
type ComponentsJSON struct { Names []string `json:",omitempty"` // if empty, implied Names[0]=="default". Assignments map[string]int `json:",omitempty"` // maps specJSON.Name to component index; missing => 0 }
request body of a /splitpkg-components update; also part of /splitpkg-json response.
type ResultJSON ¶
type ResultJSON struct { Components ComponentsJSON // component names and their assigned declarations Files []*fileJSON // files of the packages and their declarations and references Edges []*edgeJSON // inter-component edges and their references Cycles [][]int // sets of strongly-connected components }
ResultJSON describes the result of a /splitpkg-json query. It is public for testing.
Click to show internal directories.
Click to hide internal directories.