World.url.of: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/add/world.bend as World Lines 145-155 of ezx@1.11.0.0/src/add/world.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/add/world.bend&start_line=145&end_line=155 import Base import ezx@1.11.0.0/src/ez/target.bend as Tgt # the source a place records: a URL as it is, a path as it was given with a # leading `~/` expanded against HOME, and nothing for a target that names # nothing def url.of(place: Tgt.Place, +home: String) -> String: match place: case Tgt.Bad{_why}: "" case Tgt.Local{path}: Tgt.expand(home, path) case Tgt.Remote{url, _slug}: url Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ez/target.bend&name=Place https://jend.leeeet.dev/definition.txt?path=ezx@1.11.0.0/src/ez/target.bend&name=expand