1
0

chore(deps): update golangci/golangci-lint docker tag to v1.56.2 (#2099)

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2099
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
This commit is contained in:
renovate
2024-03-10 13:47:19 +00:00
committed by konrad
parent 1d5517b53a
commit d7fdefcead
19 changed files with 46 additions and 45 deletions

View File

@ -32,10 +32,10 @@ func init() {
var dumpCmd = &cobra.Command{
Use: "dump",
Short: "Dump all vikunja data into a zip file. Includes config, files and db.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInitWithoutAsync()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
filename := "vikunja-dump_" + time.Now().Format("2006-01-02_15-03-05") + ".zip"
if err := dump.Dump(filename); err != nil {
log.Critical(err.Error())

View File

@ -32,10 +32,10 @@ func init() {
var indexCmd = &cobra.Command{
Use: "index",
Short: "Reindex all of Vikunja's data into Typesense. This will remove any existing index.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInitWithoutAsync()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
if config.TypesenseURL.GetString() == "" {
log.Error("Typesense not configured")
return
@ -61,10 +61,10 @@ var indexCmd = &cobra.Command{
var partialReindexCmd = &cobra.Command{
Use: "partial-index",
Short: "Reindex any tasks which were not indexed yet into Typesense. This will not remove any existing index.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInitWithoutAsync()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
if config.TypesenseURL.GetString() == "" {
log.Error("Typesense not configured")
return

View File

@ -36,10 +36,10 @@ func init() {
var migrateCmd = &cobra.Command{
Use: "migrate",
Short: "Run all database migrations which didn't already run.",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
PersistentPreRun: func(_ *cobra.Command, _ []string) {
initialize.LightInit()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
migration.Migrate(nil)
},
}
@ -47,7 +47,7 @@ var migrateCmd = &cobra.Command{
var migrateListCmd = &cobra.Command{
Use: "list",
Short: "Show a list with all database migrations.",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
migration.ListMigrations()
},
}
@ -57,7 +57,7 @@ var rollbackUntilFlag string
var migrationRollbackCmd = &cobra.Command{
Use: "rollback",
Short: "Roll migrations back until a certain point.",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
migration.Rollback(rollbackUntilFlag)
},
}

View File

@ -31,10 +31,10 @@ var restoreCmd = &cobra.Command{
Use: "restore [filename]",
Short: "Restores all vikunja data from a vikunja dump.",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInitWithoutAsync()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
if err := dump.Restore(args[0]); err != nil {
log.Critical(err.Error())
}

View File

@ -33,13 +33,13 @@ var testmailCmd = &cobra.Command{
Use: "testmail [email]",
Short: "Send a test mail using the configured smtp connection",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.LightInit()
// Start the mail daemon
mail.StartMailDaemon()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
log.Info("Sending testmail...")
message := notifications.NewMail().
From("Vikunja <"+config.MailerFromEmail.GetString()+">").

View File

@ -128,10 +128,10 @@ var userCmd = &cobra.Command{
var userListCmd = &cobra.Command{
Use: "list",
Short: "Shows a list of all users.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
s := db.NewSession()
defer s.Close()
@ -173,10 +173,10 @@ var userListCmd = &cobra.Command{
var userCreateCmd = &cobra.Command{
Use: "create",
Short: "Create a new user.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
s := db.NewSession()
defer s.Close()
@ -214,10 +214,10 @@ var userUpdateCmd = &cobra.Command{
Use: "update [user id]",
Short: "Update an existing user.",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
s := db.NewSession()
defer s.Close()
@ -250,11 +250,11 @@ var userUpdateCmd = &cobra.Command{
var userResetPasswordCmd = &cobra.Command{
Use: "reset-password [user id]",
Short: "Reset a users password, either through mailing them a reset link or directly.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
s := db.NewSession()
defer s.Close()
@ -286,11 +286,11 @@ var userResetPasswordCmd = &cobra.Command{
var userChangeStatusCmd = &cobra.Command{
Use: "change-status [user id]",
Short: "Enable or disable a user. Will toggle the current status if no flag (--enable or --disable) is provided.",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
s := db.NewSession()
defer s.Close()
@ -327,10 +327,10 @@ var userDeleteCmd = &cobra.Command{
Short: "Delete an existing user.",
Long: "Kick off the user deletion process. If call without the --now flag, this command will only trigger an email to the user in order for them to confirm and start the deletion process. With the flag the user is deleted immediately. USE WITH CAUTION.",
Args: cobra.ExactArgs(1),
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {
if userFlagDeleteNow && !userFlagDeleteConfirm {
fmt.Println("You requested to delete the user immediately. Are you sure?")
fmt.Println(`To confirm, please type "yes, I confirm" in all uppercase:`)

View File

@ -31,7 +31,7 @@ func init() {
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version number of Vikunja",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
fmt.Printf("Vikunja api version %s\n", version.Version)
fmt.Printf("Built with %s\n", runtime.Version())
},

View File

@ -67,10 +67,10 @@ func setupUnixSocket(e *echo.Echo) error {
var webCmd = &cobra.Command{
Use: "web",
Short: "Starts the rest api web server",
PreRun: func(cmd *cobra.Command, args []string) {
PreRun: func(_ *cobra.Command, _ []string) {
initialize.FullInit()
},
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, _ []string) {
// Version notification
log.Infof("Vikunja version %s", version.Version)