gitlab.com/evatix-go/core@v1.3.55/chmodhelper/chmodins/FixRwxFullStringWithWildcards.go (about) 1 package chmodins 2 3 import ( 4 "gitlab.com/evatix-go/core/constants" 5 "gitlab.com/evatix-go/core/internal/strutilinternal" 6 ) 7 8 // FixRwxFullStringWithWildcards can be less than 10 and can be 9 // 10 // - "-rwx" will be "-rwx******" 11 // - "-rwxr-x" will be "-rwxr-x***" 12 // - "-rwxr-x" will be "-rwxr-x***" 13 func FixRwxFullStringWithWildcards(rwxFull string) (fixedRwx string) { 14 length := len(rwxFull) 15 16 if length == RwxFullLength { 17 return rwxFull 18 } else if length == constants.Zero { 19 return AllWildCardsRwxFullString 20 } 21 22 return strutilinternal.MaskLine( 23 AllWildCardsRwxFullString, 24 rwxFull) 25 }