Disable disables to feed the manager with the specified sensor. Disable is not safe for concurrent use.
(t Type)
| 113 | // Disable disables to feed the manager with the specified sensor. |
| 114 | // Disable is not safe for concurrent use. |
| 115 | func Disable(t Type) error { |
| 116 | if t < 0 || int(t) >= len(sensorNames) { |
| 117 | return errors.New("sensor: unknown sensor type") |
| 118 | } |
| 119 | return disable(t) |
| 120 | } |
| 121 | |
| 122 | func validSender() error { |
| 123 | senderMu.Lock() |