Golang kafka partitions

I have a webpage built in GO that takes a kafka topic, consumer group and a kafka broker through a form. Once these form variables are received, I am calling a kafka specific command to find the consumer lag for each partition through GO. Currently, I am displaying the results on stout since it’s a kafka specific output. How can I display this output to the user on the webpage and how can I keep refreshing this page assuming that I keep running this command every x seconds in the GO code.

I can provide the code for what I have done so far if that helps to provide some pointers.