The implementation for lockType, lock, unlock and isNotSupported is the
same on plan9 as on other platforms where filelocks are unsupported.
Change-Id: I8b9c0bdc429e23346ab9145ec3814622319427fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/476915
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !unix && !plan9 && !windows
+//go:build !unix && !windows
package filelock
+++ /dev/null
-// Copyright 2018 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build plan9
-
-package filelock
-
-import "io/fs"
-
-type lockType int8
-
-const (
- readLock = iota + 1
- writeLock
-)
-
-func lock(f File, lt lockType) error {
- return &fs.PathError{
- Op: lt.String(),
- Path: f.Name(),
- Err: ErrNotSupported,
- }
-}
-
-func unlock(f File) error {
- return &fs.PathError{
- Op: "Unlock",
- Path: f.Name(),
- Err: ErrNotSupported,
- }
-}
-
-func isNotSupported(err error) bool {
- return err == ErrNotSupported
-}