Skip to content

Commit

Permalink
brushing up
Browse files Browse the repository at this point in the history
  • Loading branch information
rusq committed Feb 20, 2023
1 parent 4ff7b7b commit 5423b11
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions internal/structures/files/dl/mattermost.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions internal/structures/files/dl/standard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions internal/transform/standard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 5423b11

Please sign in to comment.