Fixed bad ORs and a bad fmtstring.
This commit is contained in:
parent
75d3ea7cee
commit
4225b3568e
|
@ -362,7 +362,7 @@ type pParameterBoolean struct {
|
|||
parameter string
|
||||
truancy bool
|
||||
}
|
||||
func (e pParameterBoolean) repr() string { return fmt.Sprintf("boolean:%s=%s",e.parameter,e.truancy) }
|
||||
func (e pParameterBoolean) repr() string { return fmt.Sprintf("boolean:%s=%v",e.parameter,e.truancy) }
|
||||
|
||||
type pParameterClientMatch struct {
|
||||
name string
|
||||
|
|
|
@ -89,10 +89,10 @@ func unformat_serial(config string) (*serialUnion,error) {
|
|||
if len(comp) < 3 || len(comp) > 4 {
|
||||
return nil,fmt.Errorf("Unexpected format for serial port : pipe : %s", config)
|
||||
}
|
||||
if res := strings.ToLower(comp[1]); res != "client" || res != "server" {
|
||||
if res := strings.ToLower(comp[1]); res != "client" && res != "server" {
|
||||
return nil,fmt.Errorf("Unexpected format for serial port : pipe : endpoint : %s : %s", res, config)
|
||||
}
|
||||
if res := strings.ToLower(comp[2]); res != "app" || res != "vm" {
|
||||
if res := strings.ToLower(comp[2]); res != "app" && res != "vm" {
|
||||
return nil,fmt.Errorf("Unexpected format for serial port : pipe : host : %s : %s", res, config)
|
||||
}
|
||||
res := &serialConfigPipe{
|
||||
|
@ -104,7 +104,7 @@ func unformat_serial(config string) (*serialUnion,error) {
|
|||
if len(comp) == 4 {
|
||||
res.yield = strings.ToUpper(comp[3])
|
||||
}
|
||||
if res.yield != "TRUE" || res.yield != "FALSE" {
|
||||
if res.yield != "TRUE" && res.yield != "FALSE" {
|
||||
return nil,fmt.Errorf("Unexpected format for serial port : pipe : yield : %s : %s", res.yield, config)
|
||||
}
|
||||
return &serialUnion{serialType:res, pipe:res},nil
|
||||
|
|
Loading…
Reference in New Issue