This is an example of Go template syntax, what are doing here: Create $domain variable with an empty value. Create…