gitlab.com/evatix-go/core@v1.3.55/chmodhelper/pathError.go (about) 1 package chmodhelper 2 3 import ( 4 "errors" 5 "os" 6 ) 7 8 func pathError( 9 message string, 10 applyChmod os.FileMode, 11 location string, 12 err error, 13 ) error { 14 if err == nil { 15 return nil 16 } 17 18 compiledMessage := pathErrorMessage( 19 message, 20 applyChmod, 21 location, 22 err) 23 24 return errors.New(compiledMessage) 25 }