export AppCallback
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/tag Build was killed
continuous-integration/drone Build is failing

This commit is contained in:
Arnas Udovic 2025-01-12 00:18:49 +02:00
parent 1b06291e8d
commit 97de2fd06c

View file

@ -24,10 +24,10 @@ type Config struct {
AttachmentDirName string AttachmentDirName string
CustomMeta map[string]func() string CustomMeta map[string]func() string
Excludes []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 { type File struct {
Id string Id string
@ -150,7 +150,7 @@ func NewConfig(
attachmentDirName string, attachmentDirName string,
customMeta map[string]func() string, customMeta map[string]func() string,
excludes []string, excludes []string,
apps map[string]appCallback, apps map[string]AppCallback,
) Config { ) Config {
return Config{ return Config{
ReadableFormats: readableFormats, ReadableFormats: readableFormats,
@ -262,7 +262,7 @@ func moveAttachments(dir string, config Config) (map[string]string, error) {
return attachmentRegistry, err 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 { err := filepath.Walk(dir, func(fullPath string, info os.FileInfo, e error) error {
if e != nil { if e != nil {
return e return e