Skip to content

Commit

Permalink
simplify CNI version fingerprint loop
Browse files Browse the repository at this point in the history
  • Loading branch information
lgfa29 committed Apr 21, 2023
1 parent fe8e3bb commit a6e52dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions client/fingerprint/plugins_cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ func (f *PluginsCNIFingerprint) detectOnePlugin(pluginPath string, entry os.DirE
// CNI bridge plugin v1.0.0
// (and optionally another line that contains the supported CNI protocol versions)
tokens := strings.Fields(string(output))
for i := 0; i < len(tokens); i++ {
token := tokens[i]
for _, token := range tokens {
if _, parseErr := version.NewSemver(token); parseErr == nil {
return token, true
}
Expand Down

0 comments on commit a6e52dd

Please sign in to comment.