diff --git a/create/mysql.go b/create/mysql.go index ac67889..ccd190c 100644 --- a/create/mysql.go +++ b/create/mysql.go @@ -109,7 +109,7 @@ func (cmd *mySQLCmd) newMySQL(namespace string) *storage.MySQL { // ApplicationKongVars returns all variables which are used in the application // create command -func MySQLKongVars() (kong.Vars, error) { +func MySQLKongVars() kong.Vars { vmTypes := make([]string, len(infra.MachineTypes)) for i, machineType := range infra.MachineTypes { vmTypes[i] = string(machineType) @@ -128,5 +128,5 @@ func MySQLKongVars() (kong.Vars, error) { result["mysql_min_word_length"] = fmt.Sprintf("%d", storage.MySQLMinWordLengthDefault) result["mysql_transaction_isolation"] = string(storage.MySQLTransactionIsolationDefault) result["mysql_backup_retention_days"] = fmt.Sprintf("%d", storage.MySQLBackupRetentionDaysDefault) - return result, nil + return result } diff --git a/main.go b/main.go index 9f7b5a1..55fa34a 100644 --- a/main.go +++ b/main.go @@ -149,12 +149,7 @@ func kongVariables() (kong.Vars, error) { if err != nil { return nil, fmt.Errorf("error on application create kong vars: %w", err) } - mysqlCreateKongVars, err := create.MySQLKongVars() - if err != nil { - return nil, fmt.Errorf("error on mysql create kong vars: %w", err) - } - - if err := merge(result, appCreateKongVars, mysqlCreateKongVars); err != nil { + if err := merge(result, appCreateKongVars, create.MySQLKongVars()); err != nil { return nil, fmt.Errorf("error when merging kong variables: %w", err) }