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/lib/config"
11 "git.arvados.org/arvados.git/sdk/go/ctxlog"
12 "github.com/sirupsen/logrus"
19 type NoPrefixFormatter struct{}
21 func (f *NoPrefixFormatter) Format(entry *logrus.Entry) ([]byte, error) {
22 return []byte(entry.Message), nil
25 // RunCommand implements the subcommand "deduplication-report <collection> <collection> ..."
26 func (command) RunCommand(prog string, args []string, stdin io.Reader, stdout, stderr io.Writer) int {
28 logger := ctxlog.New(stderr, "text", "info")
31 logger.WithError(err).Error("fatal")
35 logger.SetFormatter(new(NoPrefixFormatter))
37 loader := config.NewLoader(stdin, logger)
38 loader.SkipLegacy = true
40 exitcode := report(prog, args, loader, logger, stdout, stderr)