Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Split ¶
Split parses the wildcard part of an Ivy or sbt URL, which is one of two layouts:
- Maven layout, `com/example/lib/1.0/lib-1.0.jar` (what sbt publishes by default and what `m2compatible` Ivy resolvers use): the last segment is the file, the two before it the version and the module, everything earlier the group, joined with dots. Recognised when the file name starts with `<module>-<version>` (a SNAPSHOT version dir also holds timestamped files `<module>-<base version>-<timestamp>-<n>.jar`).
- Ivy layout, `<org>/<module>/<revision>/<file>`, where the file name may include subdirectories (`jars/lib-1.0.jar`) and the org is one segment.
The two agree for every four-segment path. It returns the current reading, the legacy reading and whether the path is valid. The legacy reading is how releases before multi-segment groups understood the path: always the first three segments and the rest. Rows published that way live under those coordinates, so read and delete fall back to them; it equals the current reading when there is nothing to fall back to. The path is invalid when it has fewer than four segments or one that is not a plain segment (see pathseg.Name).
Types ¶
type Path ¶
type Path struct {
// Group is the organisation / group id, dotted ("com.example") whichever way
// the client wrote it.
Group string
Module string
Version string
Filename string // may hold a subdirectory in the Ivy layout ("jars/lib.jar")
}
Path is the address of one file in an Ivy or sbt repository.