// Enable implements the api.Charger interface
Enable implements the api.Charger interface
// Enable implements the api . Charger interface
func (c *GoE) Enable(enable bool) error {
	var b int
	if enable {
		b = 1
	}
	param := map[bool]string{false: "alw", true: "frc"}[c.api.IsV2()]
	if c.api.IsV2() {
		b += 1
	}
	return c.api.Update(fmt.Sprintf("%s=%d", param, b))
}
func ( c * GoE ) Enable ( enable bool ) error { var b int if enable { b = 1 } param := map [ bool ] string { false : " " , true : " " } [ c . api . IsV2 ( ) ] if c . api . IsV2 ( ) { b += 1 } return c . api . Update ( fmt . Sprintf ( " " , param , b ) ) }
Enable implements the api.Charger interface
Enable implements the api . Charger interface