Source file src/testing/testing_windows.go

     1  // Copyright 2021 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build windows
     6  
     7  package testing
     8  
     9  import (
    10  	"errors"
    11  	"syscall"
    12  )
    13  
    14  // isWindowsAccessDenied reports whether err is ERROR_ACCESS_DENIED,
    15  // which is defined only on Windows.
    16  func isWindowsAccessDenied(err error) bool {
    17  	return errors.Is(err, syscall.ERROR_ACCESS_DENIED)
    18  }
    19  

View as plain text