Run now takes a context as well as a statebag. We'll assign the context
to the blank identifier to prevent namespace collisions. We'll let the
step authors opt-in to using the context.
`find . -iname "step_*.go" -exec gsed -i'' 's/func \(.*\)Run(/func \1Run(_ context.Context, /' {} \;`
common/config_test.go:
Replaced instances of os.Mkdir and os.Create with tests that use
the existing "common/test-fixtures" mechanism.
Removed the runtime.GOOS test for the "FileExistsLocally" test,
as the functionality should work regardless of the platform.
Added some more comprehensive tests for the relative uri/pathing.
Replaced the Windows Object Manager name test as the Object
Manager's naming scheme is different from a UNC path.
Modified the FilePaths tests to support the policy of windows absolute
paths being prefixed with the `/` introduced with PR #5761.
common/config.go:
Added the ability for DownloadableURL to promote UNC paths to the SMB uri.
Modified DownloadableURL to include the "./" prefix when a relative path is passed to it.
Fix-up the DownloadableURL argument if on windows and incorrectly prefixed with "/".
config.go:
Fixed some issues related to the url scheme not being lowercased which broke some of the tests.
config_test.go:
Removed the UNC share test for \\host\share\file since SMB support has been moved to a different uri scheme.
download_test.go:
Explicitly set the CopyFile configuration option for all the unit-tests that test file copying capability.
Removed the UNC share testcase since it's under a different uri scheme now.
Modified the file:// UNC share testcase to explicitly test the smb:// uri.
Changed the incorrect t.Errorf calls to t.Logf so that the tests can pass.
config.go:
Removed all of the windows-specific net/url hackery since it's now handled mostly by download.go
Removed the replacement of '\' with '/' since url.Parse does it now.
Added knowledge of the other protocols implemented in download.go (ftp, smb)
Removed some modules that were unused in this commit.
download.go:
Moved the file-path conversions for the different protocols into their own internally callable functions.
Shuffled some of the functions around in case someone wants to implement the ability to resume.
Modified DownloadClient.Get to remove the CopyFile special case and trust the protocol implementations if a user doesn't want to copy the file.
Since all the protocols except for HTTPDownloader implement Cancel, added a Resume method as a placeholder for another developer to implement.
Added a few missing names from their function definitions.
Fixed the syntax in a few lines due to my suckage at go.
Adjusted the types for progress and total so that they support 64-bit sizes.
Removed the usage of the bufio library since it wasn't really being used.
Added proper support for validating a downloadableURL containing a UNC or relative uri.
Removed the workaround for an earlier Go issue that had remained dormant in common/download.go (issue #5927).
When building a .vmx file via the vmware-iso builder, transform the path to the correct os-formatted one (using filepath.FromSlash).