X-Git-Url: https://ruderich.org/simon/gitweb/?p=nsscash%2Fnsscash.git;a=blobdiff_plain;f=config.go;h=99b27cff35e423e607d541bbbea2fe1c9f1a0db2;hp=8e9a6308124a4d74adb7f8e2dde1ad82f16b84bf;hb=839f07d7b3130efc613d7d3fa8ed71a7d8d5fd7f;hpb=61a186321612e50e2c0224ca84c77434d3c42722 diff --git a/config.go b/config.go index 8e9a630..99b27cf 100644 --- a/config.go +++ b/config.go @@ -42,6 +42,7 @@ type FileType int const ( FileTypePlain FileType = iota FileTypePasswd + FileTypeGroup ) func (t *FileType) UnmarshalText(text []byte) error { @@ -50,6 +51,8 @@ func (t *FileType) UnmarshalText(text []byte) error { *t = FileTypePlain case "passwd": *t = FileTypePasswd + case "group": + *t = FileTypeGroup default: return fmt.Errorf("invalid file type %q", text) }