mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 14:26:40 -04:00
windows/svc: use ioutil.WriteFile instead of os.WriteFile
os.WriteFile is not available on Go 1.15. But we still need to support Go 1.15. Fixes broken Go 1.15 build https://build.golang.org/log/07b89b007d0aca2e97bc01cdf4c6a1d90e6732f9 Change-Id: I18433985ec82477160058ef96c160345304ba1ad Reviewed-on: https://go-review.googlesource.com/c/sys/+/299309 Trust: Alex Brainman <alex.brainman@gmail.com> Run-TryBot: Alex Brainman <alex.brainman@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package svc_test
|
package svc_test
|
||||||
@@ -203,7 +204,7 @@ func TestIsWindowsServiceWhenParentExits(t *testing.T) {
|
|||||||
if isSvc {
|
if isSvc {
|
||||||
msg = "IsWindowsService retuns true when not running in a service."
|
msg = "IsWindowsService retuns true when not running in a service."
|
||||||
}
|
}
|
||||||
err = os.WriteFile(dumpPath, []byte(msg), 0644)
|
err = ioutil.WriteFile(dumpPath, []byte(msg), 0644)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// We cannot report this error. But main test will notice
|
// We cannot report this error. But main test will notice
|
||||||
// that we did not create dump file.
|
// that we did not create dump file.
|
||||||
|
|||||||
Reference in New Issue
Block a user