On a particular page i am showing all users name from all department. Now i have a drop down box in that page that will show the various department present in database. Now when i select one of that department from drop down list i want to show only users belonging to that department.
Basically you only need to use
param := c.GetString("param") // Get the request parameter "param"
to get the request parameter and do you logic and the return the result.
Here is the demo code https://gist.github.com/lei-cao/a4004ccab8d528df575b