All checks were successful
continuous-integration/drone/push Build is passing
22 lines
389 B
Go
22 lines
389 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"io"
|
|
|
|
"srs.epita.fr/fic-server/libfic"
|
|
)
|
|
|
|
func init() {
|
|
OutputFormats["copy"] = func(args ...string) (func(string) (io.WriteCloser, error), io.Closer, error) {
|
|
if len(args) > 1 {
|
|
return nil, nil, errors.New("copy can only take 1 argument: [destination-folder]")
|
|
}
|
|
|
|
if len(args) == 1 {
|
|
fic.FilesDir = args[0]
|
|
}
|
|
|
|
return nil, nil, nil
|
|
}
|
|
}
|