2525package cmd
2626
2727import (
28+ "fmt"
2829 "github.com/AliceO2Group/Control/coconut/app"
30+ "github.com/fatih/color"
2931 "github.com/spf13/cobra"
30- "fmt"
3132 "github.com/spf13/viper"
32- "github.com/fatih/color"
3333 "time"
3434)
3535
3636// aboutCmd represents the about command
3737var aboutCmd = & cobra.Command {
38- Use : "about" ,
38+ Use : "about" ,
3939 Aliases : []string {},
40- Short : fmt .Sprintf ("about %s" , app .NAME ),
41- Long : `The about command shows some basic information on this utility.` ,
40+ Short : fmt .Sprintf ("about %s" , app .NAME ),
41+ Long : `The about command shows some basic information on this utility.` ,
4242 Run : func (* cobra.Command , []string ) {
4343 color .Set (color .FgHiWhite )
4444 fmt .Print (app .PRETTY_SHORTNAME + " *** " )
@@ -52,15 +52,20 @@ endpoint: %s
5252config_endpoint: %s
5353` ,
5454 color .HiGreenString (viper .GetString ("version" )),
55- color .HiGreenString (func () string {if len (viper .ConfigFileUsed ()) > 0 { return viper .ConfigFileUsed () }; return "builtin" }()),
55+ color .HiGreenString (func () string {
56+ if len (viper .ConfigFileUsed ()) > 0 {
57+ return viper .ConfigFileUsed ()
58+ }
59+ return "builtin"
60+ }()),
5661 color .HiGreenString (viper .GetString ("endpoint" )),
5762 color .HiGreenString (viper .GetString ("config_endpoint" )))
5863
5964 color .Set (color .FgHiBlue )
60- fmt .Printf ("\n Copyright 2017-%d CERN and the copyright holders of ALICE O².\n " +
61- "This program is free software: you can redistribute it and/or modify \n " +
62- "it under the terms of the GNU General Public License as published by \n " +
63- "the Free Software Foundation, either version 3 of the License, or \n " +
65+ fmt .Printf ("\n Copyright 2017-%d CERN and the copyright holders of ALICE O².\n " +
66+ "This program is free software: you can redistribute it and/or modify \n " +
67+ "it under the terms of the GNU General Public License as published by \n " +
68+ "the Free Software Foundation, either version 3 of the License, or \n " +
6469 "(at your option) any later version.\n " , time .Now ().Year ())
6570 color .Unset ()
6671
0 commit comments