X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=config.go;h=99b27cff35e423e607d541bbbea2fe1c9f1a0db2;hb=67fb8cb9a157931c94bb420f25c36d55c2876d02;hp=8e9a6308124a4d74adb7f8e2dde1ad82f16b84bf;hpb=92afde4e875a96e1ab865e29b9f0d11b08d7db1c;p=nsscash%2Fnsscash.git 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) }