*: close to producing a validating hierarchy

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-03-17 17:16:46 -04:00
parent ecdf381dd9
commit d1ddeb8e3d
4 changed files with 200 additions and 18 deletions

View file

@ -35,7 +35,6 @@ var (
SetKeywords = []string{
"uid",
"gid",
"mode",
}
// KeywordFuncs is the map of all keywords (and the functions to produce them)
KeywordFuncs = map[string]KeywordFunc{
@ -73,7 +72,7 @@ var (
var (
modeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
return fmt.Sprintf("mode=%#o", info.Mode()), nil
return fmt.Sprintf("mode=%#o", info.Mode().Perm()), nil
}
sizeKeywordFunc = func(path string, info os.FileInfo) (string, error) {
return fmt.Sprintf("size=%d", info.Size()), nil