github.com/evanw/esbuild@v0.21.4/internal/fs/error_wasm+windows.go (about)

     1  //go:build (js && wasm) || windows
     2  // +build js,wasm windows
     3  
     4  package fs
     5  
     6  import "syscall"
     7  
     8  // This check is here in a conditionally-compiled file because Go's standard
     9  // library for Plan 9 doesn't define a type called "syscall.Errno". Plan 9 is
    10  // not a supported operating system but someone wanted to be able to compile
    11  // esbuild for Plan 9 anyway.
    12  func is_ERROR_INVALID_NAME(err error) bool {
    13  	// This has been copied from golang.org/x/sys/windows
    14  	const ERROR_INVALID_NAME syscall.Errno = 123
    15  
    16  	return err == ERROR_INVALID_NAME
    17  }