os: add Perm stub on Go 1.15

This adds a stub for Perm on Go 1.15, which allows the OS package to compile again.
This commit is contained in:
Nia Waldvogel
2021-12-25 12:33:40 -05:00
committed by Nia
parent 9db8826b3b
commit c685e0696a
+6
View File
@@ -1,3 +1,4 @@
//go:build !go1.16
// +build !go1.16
package os
@@ -49,3 +50,8 @@ func (m FileMode) IsDir() bool {
func (m FileMode) IsRegular() bool {
return false
}
// Perm is a stub, always returning 0.
func (m FileMode) Perm() FileMode {
return 0
}