I am about to run a batch what I programmed using MSSQL, like this:
create function xy (
.....
end
go
create function2 xy (
...
end
go
Then,
GO is default batch terminator, it is not correct TSQL.
"Signals the end of a batch of Transact-SQL statements to the SQL Server utilities."
GO is not a Transact-SQL statement; it is a command recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code editor.
For your example make 2 calls to database or create these functions via SSMS.