N
N
NubasLol2019-05-16 15:18:06
go
NubasLol, 2019-05-16 15:18:06

How to redirect a request to another handler?

http.HandleFunc("/orders", order.Index())
  http.HandleFunc("/orders/create", order.Create())

The Index method returns a page with a table, Create creates an order and should return index. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2019-05-16
@pav5000

just call order.Index() at the end of the order.Create() function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question