Migrat pkg/password to using pkglib package

This commit is contained in:
Tom Wiesing 2023-02-26 10:24:06 +01:00
parent 010fd536ea
commit aa3580c248
No known key found for this signature in database
11 changed files with 56 additions and 158 deletions

View file

@ -0,0 +1,23 @@
package passwordx
import (
"embed"
"github.com/tkw1536/pkglib/password"
)
//go:embed common
var commonEmbed embed.FS
var Sources []password.PasswordSource
func init() {
var err error
Sources, err = password.NewSources(commonEmbed, "**/*.txt")
if err != nil {
panic(err)
}
if len(Sources) == 0 {
panic("no sources")
}
}