Skip to content

Commit

Permalink
Remove mysql mock
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaptoss committed Jul 19, 2024
1 parent 118abbf commit 5416ba1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/config/forms.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,22 @@ func (c *config) Forms() *Forms {
panic(fmt.Errorf("failed to figure out withdrawal point price: %w", err))
}

// db, err := sql.Open("mysql", cfg.URL)
// if err != nil {
// panic(fmt.Errorf("failed to connect to mysql: %w", err))
// }
db, err := sql.Open("mysql", cfg.URL)
if err != nil {
panic(fmt.Errorf("failed to connect to mysql: %w", err))
}

return &Forms{
Cooldown: cfg.Cooldown,
Period: cfg.Period,
MinAbnormalPeriod: cfg.MinAbnormalPeriod,
MaxAbnormalPeriod: cfg.MaxAbnormalPeriod,
db: nil,
db: db,
}
}).(*Forms)
}

func (f *Forms) SendForms(forms ...data.Form) error {
return nil
if len(forms) == 0 {
return nil
}
Expand Down

0 comments on commit 5416ba1

Please sign in to comment.