Questions about data types in golang?

as shown in the figure, the this.Ctx.Input.Param (": pag") in the beego framework clearly returns string, but why does the error prompt say int?

add:
Thank you for answering, because this is often written in js and php, and I don"t think there"s anything wrong with this way of writing in the screenshot at all.
and the error prompt puzzles me all the time (mainly because my English is too poor). I always thought it suggested that the data type of the parameter passed in was incorrect, but it turned out that the data type of the assignment was incorrect.

pag:=this.Ctx.Input(":pag");//pag string
pag=functions.ToInt(page);// int string pag
Apr.05,2021

page:=functions.ToInt (pag)
this.list (page, "follow")

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37e0f-40657.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37e0f-40657.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?