1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
5 package deduplicationreport
10 "git.arvados.org/arvados.git/sdk/go/ctxlog"
11 "github.com/sirupsen/logrus"
18 type NoPrefixFormatter struct{}
20 func (f *NoPrefixFormatter) Format(entry *logrus.Entry) ([]byte, error) {
21 return []byte(entry.Message + "\n"), nil
24 // RunCommand implements the subcommand "deduplication-report <collection> <collection> ..."
25 func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
27 logger := ctxlog.New(stderr, "text", "info")
30 logger.WithError(err).Error("fatal")
34 logger.SetFormatter(new(NoPrefixFormatter))
36 exitcode := report(prog, args, logger, stdout, stderr)