summaryrefslogtreecommitdiff
path: root/verbose.go
blob: 4658dcf256a292ca2f5c1a5ba63343e0dfe29157 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package config

// this is an experiment at this point to
// see how this turns out

func Verbose() bool {
	// always use the config file value first
	if configPB != nil {
		found := configPB.FindByKey("Verbose")

		if found != nil {
			if found.Value == "true" {
				return true
			}
			return false
		}
	}

	// nothing in the config file.  check argv
	for _, v := range argv {
		if v == "--verbose" {
			return true
		}
	}
	return false
}