pm/pkg/pkg.go

20 lines
452 B
Go
Raw Normal View History

2018-02-26 19:58:28 -08:00
package pkg
import (
"fmt"
2018-02-27 18:24:41 -08:00
"golang.org/x/crypto/openpgp"
"mcquay.me/fs"
)
2018-02-26 19:58:28 -08:00
// Create traverses the contents of dir and emits a valid pkg, signed by id
2018-02-27 18:24:41 -08:00
func Create(e *openpgp.Entity, dir string) error {
if !fs.Exists(dir) {
return fmt.Errorf("%q: doesn't exist", dir)
}
if !fs.IsDir(dir) {
return fmt.Errorf("%q: is not a directory", dir)
}
2018-02-27 18:24:41 -08:00
return fmt.Errorf("creating package from %q for %q: NYI", dir, e.PrimaryKey.KeyIdShortString())
2018-02-26 19:58:28 -08:00
}