SharedFeatures returns the shared features as a pretty printable string. 'wantFeatures' is a bitmask of wanted features, indexed by FeaturesIndex.
(wantFeatures []bool)
| 163 | // SharedFeatures returns the shared features as a pretty printable string. |
| 164 | // 'wantFeatures' is a bitmask of wanted features, indexed by FeaturesIndex. |
| 165 | func (f Features) SharedFeatures(wantFeatures []bool) string { |
| 166 | var b bytes.Buffer |
| 167 | if f.NetworkMode != "" { |
| 168 | b.WriteString(fmt.Sprintf("Network: %v\n", f.NetworkMode)) |
| 169 | } |
| 170 | if f.UseBufConn { |
| 171 | b.WriteString(fmt.Sprintf("UseBufConn: %v\n", f.UseBufConn)) |
| 172 | } |
| 173 | if f.EnableKeepalive { |
| 174 | b.WriteString(fmt.Sprintf("EnableKeepalive: %v\n", f.EnableKeepalive)) |
| 175 | } |
| 176 | b.WriteString(fmt.Sprintf("BenchTime: %v\n", f.BenchTime)) |
| 177 | f.partialString(&b, wantFeatures, ": ", "\n") |
| 178 | return b.String() |
| 179 | } |
| 180 | |
| 181 | // PrintableName returns a one line name which includes the features specified |
| 182 | // by 'wantFeatures' which is a bitmask of wanted features, indexed by |
no test coverage detected