]> ruderich.org/simon Gitweb - nsscash/nsscash.git/blobdiff - config.go
Add support for group files
[nsscash/nsscash.git] / config.go
index 8e9a6308124a4d74adb7f8e2dde1ad82f16b84bf..99b27cff35e423e607d541bbbea2fe1c9f1a0db2 100644 (file)
--- 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)
        }