Naming, layout and comments: descriptive full-word names, one item per line in wrapped calls and literals, and doc comments on exported names
Short and single-letter names in application code become full words (tests keep theirs). Wrapped calls, signatures and composite literals put one item per line, and one-line function bodies are expanded. Exported names and groups of constants get doc comments, and comments refer to the renamed identifiers.
This commit is contained in:
1 parent
043e307663
commit
465358609a
78 files changed
+2374
-1402
No files matched your search
@@ -32,13 +32,13 @@ confirmed by providing -yes.`,
|
||||
yes, _ := cmd.Flags().GetBool("yes")
|
||||
steps, _ := cmd.Flags().GetUint("steps")
|
||||
|
||||
m, db, err := openMigrator(cmd, opts, false, false)
|
||||
migrator, db, err := openMigrator(cmd, opts, false, false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer closeDB(db, &err)
|
||||
|
||||
results, err := store.StepDown(cmd.Context(), m, int(steps), yes)
|
||||
results, err := store.StepDown(cmd.Context(), migrator, int(steps), yes)
|
||||
|
||||
if len(results) == 0 && err == nil {
|
||||
fmt.Println("No changes made to database (empty)")
|
||||
@@ -58,7 +58,7 @@ confirmed by providing -yes.`,
|
||||
return failure(cmd.OutOrStdout(), err)
|
||||
}
|
||||
|
||||
return printVersion(cmd.Context(), cmd.OutOrStdout(), m)
|
||||
return printVersion(cmd.Context(), cmd.OutOrStdout(), migrator)
|
||||
},
|
||||
}
|
||||
cmd.Flags().Uint(
|
||||
|
||||
Reference in new issue
Block a user