update '-v' flag behavior to include copyRight and license (#15097)

```
~ minio -v
minio version DEVELOPMENT.2022-06-16T20-40-14Z (commit-id=e083228e2a06bfdcd006fee28d449cd2b47c542a)
Runtime: go1.18.3 linux/amd64
Copyright (c) 2015-2022 MinIO, Inc.
Licence AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
```
This commit is contained in:
Harshavardhana
2022-06-16 16:10:48 -07:00
committed by GitHub
parent 013cc66d8e
commit d228d29944
4 changed files with 32 additions and 27 deletions

View File

@@ -73,6 +73,13 @@ var (
return fmt.Sprint
}()
Greenf = func() func(format string, a ...interface{}) string {
if IsTerminal() {
return color.New(color.FgGreen).SprintfFunc()
}
return fmt.Sprintf
}()
GreenBold = func() func(a ...interface{}) string {
if IsTerminal() {
return color.New(color.FgGreen, color.Bold).SprintFunc()