godocs
Vladimir Bauer
7 years ago
| 95 | 95 | |
| 96 | 96 | // WC is a struct with two public fields W and C, both of int type. |
| 97 | 97 | // W represents width and C represents bit set of width related config. |
| 98 | // A decorator should embed WC, in order to become Syncable. | |
| 98 | 99 | type WC struct { |
| 99 | 100 | W int |
| 100 | 101 | C int |
| 131 | 132 | } |
| 132 | 133 | } |
| 133 | 134 | |
| 135 | // Syncable is implementation of Syncable interface. | |
| 134 | 136 | func (wc *WC) Syncable() (bool, chan int) { |
| 135 | 137 | return (wc.C & DSyncWidth) != 0, wc.wsync |
| 136 | 138 | } |