mirror of
https://github.com/vlang/v.git
synced 2025-09-09 07:15:50 -04:00
net : fix error msg
from os.hostname() cannot get the host name to net.hostname() cannot get the host name
This commit is contained in:
parent
0ca58aba5e
commit
9d4b4df54f
@ -7,7 +7,7 @@ pub fn hostname() ?string {
|
|||||||
// The host name is returned as a null-terminated string.
|
// The host name is returned as a null-terminated string.
|
||||||
res := C.gethostname(&name, 256)
|
res := C.gethostname(&name, 256)
|
||||||
if res != 0 {
|
if res != 0 {
|
||||||
return error('os.hostname() cannot get the host name')
|
return error('net.hostname() cannot get the host name')
|
||||||
}
|
}
|
||||||
return tos_clone(name)
|
return tos_clone(name)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user