File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1616 flagPct = flag .String ("pct" , "" , "coverage percentage (required)" )
1717)
1818
19+ var ErrMissingPctFlag = errors .New ("missing required flag -pct" )
20+
1921func mainfn () int {
20- var err error
22+ err := ErrMissingPctFlag
2123 if * flagPct != "" {
2224 repoDir := os .ExpandEnv (flag .Arg (0 ))
2325 if repoDir == "" {
@@ -40,12 +42,10 @@ func mainfn() int {
4042 }
4143
4244 retv := 125
43- if err != nil {
44- fmt .Fprintln (os .Stderr , err .Error ())
45- if e := errors .Unwrap (err ); e != nil {
46- if errno , ok := e .(syscall.Errno ); ok {
47- retv = int (errno )
48- }
45+ fmt .Fprintln (os .Stderr , err .Error ())
46+ if e := errors .Unwrap (err ); e != nil {
47+ if errno , ok := e .(syscall.Errno ); ok {
48+ retv = int (errno )
4949 }
5050 }
5151 return retv
You can’t perform that action at this time.
0 commit comments