17417: Merge branch 'main' into 17417-add-arm64
[arvados.git] / lib / deduplicationreport / command.go
index 2fdf221b0b671957283ca3401e024be556dbc288..39bbbc9498c2b10055dff1d24227275ec6ae1fba 100644 (file)
@@ -7,20 +7,14 @@ package deduplicationreport
 import (
        "io"
 
+       "git.arvados.org/arvados.git/lib/cmd"
        "git.arvados.org/arvados.git/sdk/go/ctxlog"
-       "github.com/sirupsen/logrus"
 )
 
 var Command command
 
 type command struct{}
 
-type NoPrefixFormatter struct{}
-
-func (f *NoPrefixFormatter) Format(entry *logrus.Entry) ([]byte, error) {
-       return []byte(entry.Message), nil
-}
-
 // RunCommand implements the subcommand "deduplication-report <collection> <collection> ..."
 func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
        var err error
@@ -31,7 +25,7 @@ func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, s
                }
        }()
 
-       logger.SetFormatter(new(NoPrefixFormatter))
+       logger.SetFormatter(cmd.NoPrefixFormatter{})
 
        exitcode := report(prog, args, logger, stdout, stderr)