export AppCallback
This commit is contained in:
parent
1b06291e8d
commit
97de2fd06c
1 changed files with 4 additions and 4 deletions
8
tree.go
8
tree.go
|
@ -24,10 +24,10 @@ type Config struct {
|
|||
AttachmentDirName string
|
||||
CustomMeta map[string]func() string
|
||||
Excludes []string
|
||||
Apps map[string]appCallback
|
||||
Apps map[string]AppCallback
|
||||
}
|
||||
|
||||
type appCallback func(dir string, content string, info os.FileInfo) (string, error)
|
||||
type AppCallback func(dir string, content string, info os.FileInfo) (string, error)
|
||||
|
||||
type File struct {
|
||||
Id string
|
||||
|
@ -150,7 +150,7 @@ func NewConfig(
|
|||
attachmentDirName string,
|
||||
customMeta map[string]func() string,
|
||||
excludes []string,
|
||||
apps map[string]appCallback,
|
||||
apps map[string]AppCallback,
|
||||
) Config {
|
||||
return Config{
|
||||
ReadableFormats: readableFormats,
|
||||
|
@ -262,7 +262,7 @@ func moveAttachments(dir string, config Config) (map[string]string, error) {
|
|||
return attachmentRegistry, err
|
||||
}
|
||||
|
||||
func applyApp(app appCallback, dir string, config Config) error {
|
||||
func applyApp(app AppCallback, dir string, config Config) error {
|
||||
err := filepath.Walk(dir, func(fullPath string, info os.FileInfo, e error) error {
|
||||
if e != nil {
|
||||
return e
|
||||
|
|
Loading…
Reference in a new issue