forked from security/hakurei
These packages are highly specific to hakurei and are difficult to use safely from other pieces of code. Their exported symbols are made available until v0.4.0 where they will be removed for #24. Signed-off-by: Ophestra <cat@gensokyo.uk>
18 lines
358 B
Go
18 lines
358 B
Go
package xcb
|
|
|
|
import "errors"
|
|
|
|
var ErrChangeHosts = errors.New("xcb_change_hosts() failed")
|
|
|
|
func ChangeHosts(mode HostMode, family Family, address string) error {
|
|
conn := new(connection)
|
|
if err := conn.connect(); err != nil {
|
|
conn.disconnect()
|
|
return err
|
|
} else {
|
|
defer conn.disconnect()
|
|
}
|
|
|
|
return conn.changeHostsChecked(mode, family, address)
|
|
}
|