Remove workaround for Nano server TP5

This workaround for golang/go#15286 was added for Nano server TP5 in
fa82c0aa10, and should no longer be
needed

Due to a security fix in Go 1.9.4/1.8.7, loading the .dll is no longer
allowed, and produces an error:

   .\docker_windows.go:9:3: //go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" only allowed in cgo-generated code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2018-02-07 23:38:14 -08:00
parent caeab26843
commit 250193387c
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -1,18 +1,5 @@
package main
import (
"sync/atomic"
_ "github.com/docker/docker/autogen/winresources/dockerd"
)
//go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll"
var dummy uintptr
func init() {
// Ensure that this import is not removed by the linker. This is used to
// ensure that shell32.dll is loaded by the system loader, preventing
// go#15286 from triggering on Nano Server TP5.
atomic.LoadUintptr(&dummy)
}