invoke: Enable plugin file names with extensions
authorOnur Filiz <onur.filiz@microsoft.com>
Sat, 4 Feb 2017 20:01:47 +0000 (12:01 -0800)
committerOnur Filiz <onur.filiz@microsoft.com>
Sat, 4 Feb 2017 20:01:47 +0000 (12:01 -0800)
commita35f8ae914418a48c433618a592b849eb3e61c6a
tree0b028ee67a1a3763e825afa17248fb492e0fb389
parent06b397912bf4d3ad97119930de313339be02cecd
invoke: Enable plugin file names with extensions

A CNI network configuration file contains the plugin's executable file name.
Some platforms like Windows require a file name extension for executables.
This causes unnecessary burden on admins as they now have to maintain two
versions of each type of netconfig file, which differ only by the ".exe"
extension. A much simpler design is for invoke package to also look for
well-known extensions on platforms that require it. Existing tests are
improved and new tests are added to cover the new behavior.

Fixes #360
invoke/find.go
invoke/find_test.go
invoke/os_unix.go [new file with mode: 0644]
invoke/os_windows.go [new file with mode: 0644]