summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go30
1 files changed, 7 insertions, 23 deletions
diff --git a/main.go b/main.go
index f324596..72299a6 100644
--- a/main.go
+++ b/main.go
@@ -58,25 +58,20 @@ func main() {
}
okExit(check, "go.mod seems clean")
}
-
- if err := doMain(check); err != nil {
- badExit(check, err)
+ if argv.Smart {
+ // best effort
+ if err := doSmart(check); err != nil {
+ // badExit(check, err)
+ }
+ okExit(check, "maybe it's ok")
}
+
if argv.Force {
if err := doForce(check); err != nil {
badExit(check, err)
}
- } else {
- if err := doSmart(check); err != nil {
- badExit(check, err)
- }
}
- if configSave {
- forge.ConfigSave()
- }
-
- log.Info("forge.FinalGoDepsCheck() worked :", check.GetGoPath())
okExit(check, "go.sum seems clean")
}
@@ -111,14 +106,3 @@ func saveAsMetadata(repo *gitpb.Repo) error {
}
return nil
}
-
-func doMain(repo *gitpb.Repo) error {
- if argv.Force {
- err := doForce(repo)
- return err
- }
-
- // if --force or --strict is not set, fall back to a "smart" guess
- // at what the user probably would want
- return doSmart(repo)
-}