As far as I understand, the struct allocation is always on heap whenever pointer value is requested, inside or outside function.
Link: Stack vs heap allocation of structs in Go, and how they relate to garbage collection - Stack Overflow (see PeterSO’s disassembly answer first and then the accepted Sonia’s disassembly).
What you’re really interested in is CALL ,runtime.new+0(SB)
where the binary is calling the heap allocation.
Is this Go 101 manual sufficient? Memory Blocks -Go 101
I’m including go disassembler guide just in case you need it in your exploration: https://www.grant.pizza/dissecting-go-binaries/.