uri: Update documentation typo (#10471)
This commit is contained in:
parent
4f0c3274ee
commit
91b39f2219
1 changed files with 3 additions and 4 deletions
|
|
@ -33,8 +33,7 @@
|
||||||
## import uri
|
## import uri
|
||||||
## let res = parseUri("sftp://127.0.0.1:4343")
|
## let res = parseUri("sftp://127.0.0.1:4343")
|
||||||
## if isAbsolute(res):
|
## if isAbsolute(res):
|
||||||
## echo "Connect to port: " & res.port
|
## assert res.port == "4343"
|
||||||
## # --> Connect to port: 4343
|
|
||||||
## else:
|
## else:
|
||||||
## echo "Wrong format"
|
## echo "Wrong format"
|
||||||
|
|
||||||
|
|
@ -343,9 +342,9 @@ proc combine*(uris: varargs[Uri]): Uri =
|
||||||
## **See also:**
|
## **See also:**
|
||||||
## * `/ proc <#/,Uri,string>`_ for building URIs
|
## * `/ proc <#/,Uri,string>`_ for building URIs
|
||||||
runnableExamples:
|
runnableExamples:
|
||||||
let foo = combine(parseUri("https://nim-lang.org/blog.html"), parseUri("/install.html"))
|
let foo = combine(parseUri("https://nim-lang.org/"), parseUri("docs/"), parseUri("manual.html"))
|
||||||
assert foo.hostname == "nim-lang.org"
|
assert foo.hostname == "nim-lang.org"
|
||||||
assert foo.path == "/install.html"
|
assert foo.path == "/docs/manual.html"
|
||||||
result = uris[0]
|
result = uris[0]
|
||||||
for i in 1 ..< uris.len:
|
for i in 1 ..< uris.len:
|
||||||
result = combine(result, uris[i])
|
result = combine(result, uris[i])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue