refactor: refactor package with gofumpt

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-06-05 14:51:37 +08:00
parent e6aa1f0c61
commit 6d710c20e1
18 changed files with 44 additions and 72 deletions
+2 -5
View File
@@ -21,13 +21,10 @@ type firefox struct {
itemPaths map[item.Item]string
}
var (
ErrProfilePathNotFound = errors.New("profile path not found")
)
var ErrProfilePathNotFound = errors.New("profile path not found")
// New returns a new firefox instance.
func New(name, storage, profilePath string, items []item.Item) ([]*firefox, error) {
f := &firefox{
name: name,
storage: storage,
@@ -50,7 +47,7 @@ func New(name, storage, profilePath string, items []item.Item) ([]*firefox, erro
}
func (f *firefox) getMultiItemPath(profilePath string, items []item.Item) (map[string]map[item.Item]string, error) {
var multiItemPaths = make(map[string]map[item.Item]string)
multiItemPaths := make(map[string]map[item.Item]string)
err := filepath.Walk(profilePath, firefoxWalkFunc(items, multiItemPaths))
return multiItemPaths, err
}