From 5423b110db72a9db680c8d127d104a9fbd84c908 Mon Sep 17 00:00:00 2001 From: Rustam Gilyazov <16064414+rusq@users.noreply.github.com> Date: Mon, 20 Feb 2023 22:07:54 +1000 Subject: [PATCH] brushing up --- internal/structures/files/dl/mattermost.go | 1 + internal/structures/files/dl/standard.go | 5 +++-- internal/transform/standard.go | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/structures/files/dl/mattermost.go b/internal/structures/files/dl/mattermost.go index 0caa71df..3a1e4e4b 100644 --- a/internal/structures/files/dl/mattermost.go +++ b/internal/structures/files/dl/mattermost.go @@ -53,6 +53,7 @@ func (md *Mattermost) ProcessFunc(_ string) slackdump.ProcessFunc { } total++ if md.token != "" { + // update the file URL if the token is set. return files.Update(msgs, addr, files.UpdateTokenFn(md.token)) } return nil diff --git a/internal/structures/files/dl/standard.go b/internal/structures/files/dl/standard.go index cb8a6f2b..983b9076 100644 --- a/internal/structures/files/dl/standard.go +++ b/internal/structures/files/dl/standard.go @@ -29,7 +29,8 @@ func NewStd(fs fsadapter.FS, cl *slack.Client, l logger.Interface, token string) dl: downloader.New(cl, fs, downloader.Logger(l)), l: l, token: token, - }} + }, + } } // ProcessFunc returns the function that downloads the file into @@ -42,7 +43,7 @@ func (d *Std) ProcessFunc(channelName string) slackdump.ProcessFunc { ) dir := filepath.Join(channelName, dirAttach) - return func(msg []types.Message, channelID string) (slackdump.ProcessResult, error) { + return func(msg []types.Message, _ string) (slackdump.ProcessResult, error) { total := 0 if err := files.Extract(msg, files.Root, func(file slack.File, addr files.Addr) error { filename, err := d.dl.DownloadFile(dir, file) diff --git a/internal/transform/standard.go b/internal/transform/standard.go index 8c5bff5d..ab65f6ce 100644 --- a/internal/transform/standard.go +++ b/internal/transform/standard.go @@ -6,10 +6,10 @@ type Standard struct { fs fsadapter.FS } -func NewStandard(fs fsadapter.FS, fsdir string) *Standard { +func NewStandard(fs fsadapter.FS, fsdir string, srcDir string) *Standard { return &Standard{fs: fs} } -func (s *Standard) Do() error { +func (s *Standard) Transform() error { return nil }