Closed alexzorin closed 10 years ago
@dorzheh the problem with
type VirDomainState int
const (
VIR_DOMAIN_RUNNING VirDomainState = C.VIR_DOMAIN_RUNNING
VIR_DOMAIN_SHUTOFF VirDomainState = C.VIR_DOMAIN_SHUTOFF
)
is that replacing the current consts
(which are ints
) is not backwards compatible:
./domain_test.go:170: invalid operation: state[0] != VIR_DOMAIN_RUNNING (mismatched types int and VirDomainState)
./domain_test.go:183: invalid operation: state[0] != VIR_DOMAIN_SHUTOFF (mismatched types int and VirDomainState)
Your way is correct if I had a chance to redo it but it looks like this will have to stay as it is for now
ok,
As in #8 Must be backwards-compatible