-
-
Notifications
You must be signed in to change notification settings - Fork 384
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: main.go build by moving Umask methods to utils (#1967)
* fix : builds Signed-off-by: charankamarapu <kamarapucharan@gmail.com> * fix: go build Signed-off-by: charankamarapu <kamarapucharan@gmail.com> --------- Signed-off-by: charankamarapu <kamarapucharan@gmail.com>
- Loading branch information
1 parent
b02c0b5
commit ecb8ba8
Showing
5 changed files
with
26 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//go:build !windows | ||
|
||
package utils | ||
|
||
import "syscall" | ||
|
||
func SetUmask() int { | ||
return syscall.Umask(0) | ||
} | ||
|
||
func RestoreUmask(oldMask int) { | ||
syscall.Umask(oldMask) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build windows | ||
|
||
package utils | ||
|
||
func SetUmask() int { | ||
return 0 | ||
} | ||
|
||
func RestoreUmask(oldMask int) { | ||
// Do nothing | ||
} |