Compare commits
3 Commits
v0.1.0
...
0d49fc86d7
Author | SHA1 | Date | |
---|---|---|---|
0d49fc86d7 | |||
f35554437d | |||
6e26d24a42 |
@ -1,9 +1,7 @@
|
|||||||
name: CI
|
name: Docs
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master" ]
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -19,9 +17,6 @@ jobs:
|
|||||||
unzip -q /tmp/v.zip -d /tmp
|
unzip -q /tmp/v.zip -d /tmp
|
||||||
echo /tmp/v >> "$GITHUB_PATH"
|
echo /tmp/v >> "$GITHUB_PATH"
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: v -stats test .
|
|
||||||
|
|
||||||
- name: Build docs
|
- name: Build docs
|
||||||
run: |
|
run: |
|
||||||
v doc -f html -m .
|
v doc -f html -m .
|
24
.github/workflows/test.yaml
vendored
Normal file
24
.github/workflows/test.yaml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup V
|
||||||
|
run: |
|
||||||
|
wget -qO /tmp/v.zip https://github.com/vlang/v/releases/latest/download/v_linux.zip
|
||||||
|
unzip -q /tmp/v.zip -d /tmp
|
||||||
|
echo /tmp/v >> "$GITHUB_PATH"
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
v -stats test .
|
@ -46,7 +46,7 @@ fn main() {
|
|||||||
if ip is netaddr.Ipv4Net || ip is netaddr.Ipv6Net {
|
if ip is netaddr.Ipv4Net || ip is netaddr.Ipv6Net {
|
||||||
panic('${ip} seems to be network, not a single host addresses')
|
panic('${ip} seems to be network, not a single host addresses')
|
||||||
}
|
}
|
||||||
println(addr)
|
println(ip)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -265,3 +265,9 @@ println(ip) // 2001:db8::8429:6bff:fedc:ef8b
|
|||||||
|
|
||||||
Note that using EUI in IPv6 address may cause security issues. See
|
Note that using EUI in IPv6 address may cause security issues. See
|
||||||
[RFC 4941](https://datatracker.ietf.org/doc/html/rfc4941) for details.
|
[RFC 4941](https://datatracker.ietf.org/doc/html/rfc4941) for details.
|
||||||
|
|
||||||
|
# License
|
||||||
|
|
||||||
|
`netaddr` is released under LGPL 3.0 or later license.
|
||||||
|
|
||||||
|
SPDX Lincese ID: `LGPL-3.0-or-later`.
|
||||||
|
Reference in New Issue
Block a user