otiai10 / copy

Go copy directory recursively

Home Page:https://pkg.go.dev/github.com/otiai10/copy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add config to rename file

tomaswarynyca opened this issue · comments

I have several files embedded (waiting for the PR for the support)
When copying them it would be nice if I can edit the name.
Would it be possible to add a function in the configuration to do this?
What do you think? @otiai10

In my opinion, renaming files is not in the scope of this software.
I'd like to know the specific use case of this feature you imagine.

In my case I have embedded files (thanks for the support).
These files have double extensions (so that the go compiler doesn't go crazy).
So I have to remove the double extension when copying them.
e.g. main.go.stub to main.go

@otiai10 did you have time to analyse this functionality?