/
config.go
56 lines (51 loc) · 1.58 KB
/
config.go
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package config
import "runtime/debug"
const (
_defaultSemVer = "v0.0.0-dev"
)
// SemVer is the version of mockery at build time.
var SemVer = ""
func GetSemverInfo() string {
if SemVer != "" {
return SemVer
}
version, ok := debug.ReadBuildInfo()
if ok && version.Main.Version != "(devel)" && version.Main.Version != "" {
return version.Main.Version
}
return _defaultSemVer
}
type Config struct {
All bool
BuildTags string `mapstructure:"tags"`
Case string
Config string
Cpuprofile string
Dir string
DisableVersionString bool `mapstructure:"disable-version-string"`
DryRun bool `mapstructure:"dry-run"`
Exported bool `mapstructure:"exported"`
FileName string
InPackage bool
KeepTree bool
LogLevel string `mapstructure:"log-level"`
Name string
Note string
Outpkg string
Packageprefix string
Output string
Print bool
Profile string
Quiet bool
Recursive bool
SrcPkg string
BoilerplateFile string `mapstructure:"boilerplate-file"`
// StructName overrides the name given to the mock struct and should only be nonempty
// when generating for an exact match (non regex expression in -name).
StructName string
Tags string
TestOnly bool
UnrollVariadic bool `mapstructure:"unroll-variadic"`
Version bool
WithExpecter bool `mapstructure:"with-expecter"`
}