forked from kevadesu/forgejo
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
This commit is contained in:
parent
1d98d205f5
commit
54e9ee37a7
423 changed files with 1585 additions and 1758 deletions
|
@ -296,7 +296,6 @@ func fixBrokenRepoUnits16961(ctx context.Context, logger log.Logger, autofix boo
|
|||
return repo_model.UpdateRepoUnit(repoUnit)
|
||||
},
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
logger.Critical("Unable to iterate across repounits to fix the broken units: Error %v", err)
|
||||
return err
|
||||
|
|
|
@ -119,7 +119,6 @@ func checkEnablePushOptions(ctx context.Context, logger log.Logger, autofix bool
|
|||
logger.Info("Enabled push options for %d repositories.", numRepos)
|
||||
} else {
|
||||
logger.Info("Checked %d repositories, %d need updates.", numRepos, numNeedUpdate)
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -27,7 +27,7 @@ func checkConfigurationFile(logger log.Logger, autofix bool, fileOpts configurat
|
|||
fi, err := os.Stat(fileOpts.Path)
|
||||
if err != nil {
|
||||
if os.IsNotExist(err) && autofix && fileOpts.IsDirectory {
|
||||
if err := os.MkdirAll(fileOpts.Path, 0777); err != nil {
|
||||
if err := os.MkdirAll(fileOpts.Path, 0o777); err != nil {
|
||||
logger.Error(" Directory does not exist and could not be created. ERROR: %v", err)
|
||||
return fmt.Errorf("Configuration directory: \"%q\" does not exist and could not be created. ERROR: %v", fileOpts.Path, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue