Compare commits
2 Commits
8851e56a8b
...
a815937d43
| Author | SHA1 | Date | |
|---|---|---|---|
| a815937d43 | |||
|
|
5c0d45f3e5 |
2
.github/workflows/docs.yaml
vendored
2
.github/workflows/docs.yaml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
run: |
|
||||
v doc -f html -m .
|
||||
pushd _docs
|
||||
ln -vs netaddr.html index.html
|
||||
ln -vs ${{ github.event.repository.name }}.html index.html
|
||||
ls -alFh
|
||||
popd
|
||||
|
||||
|
||||
@@ -196,8 +196,7 @@ if available. For example (V REPL session):
|
||||
fe80::d08e:6658:38bd:6391%wlan0
|
||||
>>> ip6_scoped.zone_id
|
||||
Option('wlan0')
|
||||
>>> zone_id := ip6_scoped.zone_id as string
|
||||
>>> zone_id
|
||||
>>> ip6_scoped.zone_id?
|
||||
wlan0
|
||||
```
|
||||
|
||||
|
||||
9
ip6.v
9
ip6.v
@@ -234,8 +234,9 @@ pub fn (a Ipv6Addr) format(fmt Ipv6AddrFormat) string {
|
||||
}
|
||||
if a.zone_id == none {
|
||||
return str.join(':')
|
||||
} else {
|
||||
return str.join(':') + '%' + a.zone_id
|
||||
}
|
||||
return str.join(':') + '%' + (a.zone_id as string)
|
||||
}
|
||||
fmt & .verbose == .verbose {
|
||||
if fmt & .dotted == .dotted {
|
||||
@@ -253,8 +254,9 @@ pub fn (a Ipv6Addr) format(fmt Ipv6AddrFormat) string {
|
||||
}
|
||||
if a.zone_id == none {
|
||||
return str.join(':')
|
||||
} else {
|
||||
return str.join(':') + '%' + a.zone_id
|
||||
}
|
||||
return str.join(':') + '%' + (a.zone_id as string)
|
||||
}
|
||||
else {
|
||||
return a.str()
|
||||
@@ -459,8 +461,7 @@ pub:
|
||||
|
||||
fn (p Ipv6AddrParams) validate() ! {
|
||||
if p.zone_id != none {
|
||||
zone_id := p.zone_id as string
|
||||
if zone_id.is_blank() || zone_id.contains('%') {
|
||||
if p.zone_id.is_blank() || p.zone_id.contains('%') {
|
||||
return error('zone_id cannot be blank or contain % sign')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user