22)
23
24// TradeHandler handleHome is the handler for the '/trade' page request.
25func TradeHandler(w http.ResponseWriter, r *http.Request) { 26 if err := tpl.ExecuteTemplate(w, "trade.html", nil); err != nil {
27 http.Error(w, err.Error(), http.StatusInternalServerError)
28 logrus.Errorf("error template: %s\n", err)
6 "net/http"
7)
8
9func (history WithdrawHistoryResponse) Render(w http.ResponseWriter, r *http.Request) error {10 return nil
11}
12
13)
14
15// KrakenConvertUSDT converts all USDT to Euros
16func KrakenConvertUSDT(code currency.Code, d *dealer.Dealer) (order.SubmitResponse, error) { 17
18 exchange, err := d.ExchangeManager.GetExchangeByName("Kraken")
19 if err != nil {
6 "net/http"
7)
8
9func (history WithdrawHistoryResponse) Render(w http.ResponseWriter, r *http.Request) error {10 return nil
11}
12
19 return asynq.NewTask(TypeOrder, payload), nil
20}
21
22func HandleOrderTask(ctx context.Context, task *asynq.Task) error {23 var o *order.Submit // order.Submit
24 err := json.Unmarshal(task.Payload(), &o)
25 if err != nil {
Unused parameters in functions or methods should be replaced with _
(underscore) or removed.
Functions or methods with unused parameters can be a symptom of unfinished
refactoring or a bug. If an unused parameter is present, it should be named _
(underscore) to avoid raising this issue and better readability.
func abc(unused string) {
fmt.Println("Not using any passed params.")
}
func abc(_ string) {
fmt.Println("Not using any passed params.")
}
func abc() {
fmt.Println("Not using any passed params.")
}