My Golang program needs to work with client side

I am making a Golang ecommerce site for experience. To display the records I use a template. What is the best/easiest way to run my four functions and store an array on the client side? The functions change and hide the records and are now written in javascript The array is to keep track of how many products have been bought with more than one search. May I please have some help. If you can think of anyway to make this request better, would you let me know, please? Thank you!

I have tried looking up template and golang. I have seen various libraries for golang and Javascript and noted that they have problems. I have found gopherjs. I have considered possible help and documentation. I have tried videos but wasn’t to impressed.

Here is my source code, the three function have not been tested yet. Program is run by template button.


Edit: Oh, the program lists records that have a keyword in the database.


You could try gorilla sessions.

I have used localStorage in some cases. You can store an array also.

Thank you for the hint about localstorage, in case someone sees this, my problem was fixed. I just repurged to reset the graphical user interface value.

To delete a record have this :

.test100 { visibility: hidden; }

and set the div value to test100 with something like this {{.a_value}} when repurging.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.