All checks were successful
Test / Create distribution (push) Successful in 35s
Test / Sandbox (push) Successful in 1m52s
Test / Hakurei (push) Successful in 3m16s
Test / Hpkg (push) Successful in 3m39s
Test / Sandbox (race detector) (push) Successful in 4m17s
Test / Hakurei (race detector) (push) Successful in 5m22s
Test / Flake checks (push) Successful in 1m36s
This package still does not deserve to be out of internal, but at least it is less haunting now. I am still not handling the xcb error though, the struct is almost entirely undocumented and the implementation is unreadable. Not even going to try. 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)
|
|
}
|