Bind alias value to structs

Hi ,

Can anyone suggest me how to bind the temporary alias(temporary column in database) value to structs which is not present in the database.

Following is the structs for log table:-

type LogEntry struct {
File string json:"filename"
Function string json:"functionname"
Level string json:"level"
LineNo int json:"lineno"
Message string json:"msg"
Time string json:"time"

Following is my query:

“select count(*) as total from logs group by message”.

So basically I have to bind this structs to total value which I am getting from query and want to show this total value on html page.

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