mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-18 19:44:00 +00:00
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:
@@ -1,3 +1,4 @@
|
|||||||
|
//go:build !go1.16
|
||||||
// +build !go1.16
|
// +build !go1.16
|
||||||
|
|
||||||
package os
|
package os
|
||||||
@@ -49,3 +50,8 @@ func (m FileMode) IsDir() bool {
|
|||||||
func (m FileMode) IsRegular() bool {
|
func (m FileMode) IsRegular() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Perm is a stub, always returning 0.
|
||||||
|
func (m FileMode) Perm() FileMode {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user