()
| 107 | } |
| 108 | |
| 109 | func (fs *featureSelector) datagramVersion() DatagramVersion { |
| 110 | // If user provides the feature via the cli, we take it as priority over remote feature evaluation |
| 111 | if slices.Contains(fs.cliFeatures, FeatureDatagramV3_2) { |
| 112 | return DatagramV3 |
| 113 | } |
| 114 | // If the user specifies DatagramV2, we also take that over remote |
| 115 | if slices.Contains(fs.cliFeatures, FeatureDatagramV2) { |
| 116 | return DatagramV2 |
| 117 | } |
| 118 | |
| 119 | if fs.accountEnabled(fs.remoteFeatures.DatagramV3Percentage) { |
| 120 | return DatagramV3 |
| 121 | } |
| 122 | |
| 123 | return DatagramV2 |
| 124 | } |
| 125 | |
| 126 | // prechecksSkip returns whether prechecks are enabled via DNS flag. |
| 127 | // Defaults to false if not set in the DNS TXT record. |
no test coverage detected