Select Git revision
-
Md. Alim Ul Karim authored
ChmodHelper Integrated Tests for Unix, Refactor Interfaces ## Introduction ChmodHelper Integrated Tests for Unix, Refactor Interfaces Note: [Template Reference](https://hackmd.io/@akarimevatix/H1Qsmq23w) ## Worked on Items - [x] #45 - Write Tests for PathChmods - [x] #47 - Refactor interfaces - [x] #48 - add integrated test for chmodhelper ## TODOs - [ ] #46 - Use the temp dir for testing ## References - N/A ## Notes - N/A See merge request !45
Md. Alim Ul Karim authoredChmodHelper Integrated Tests for Unix, Refactor Interfaces ## Introduction ChmodHelper Integrated Tests for Unix, Refactor Interfaces Note: [Template Reference](https://hackmd.io/@akarimevatix/H1Qsmq23w) ## Worked on Items - [x] #45 - Write Tests for PathChmods - [x] #47 - Refactor interfaces - [x] #48 - add integrated test for chmodhelper ## TODOs - [ ] #46 - Use the temp dir for testing ## References - N/A ## Notes - N/A See merge request !45
ParseRwxInstructionToStringRwx.go 491 B
package chmodhelper
import (
"gitlab.com/evatix-go/core/chmodhelper/chmodins"
"gitlab.com/evatix-go/core/constants"
)
func ParseRwxInstructionToStringRwx(
rwxInstruction *chmodins.RwxOwnerGroupOther,
isIncludeHyphen bool,
) string {
if rwxInstruction == nil {
return constants.EmptyString
}
var hyphen string
if isIncludeHyphen {
hyphen = constants.Hyphen
}
compiled := hyphen +
rwxInstruction.Owner +
rwxInstruction.Group +
rwxInstruction.Other
return compiled
}