The append documentation on go.dev is out of date as it states:
where T is a placeholder for any given type. You can’t actually write a function in Go where the type
T
is determined by the caller. That’s whyappend
is built in: it needs support from the compiler.
This is no longer true with the release of 1.18. Link to docs here: Effective Go - The Go Programming Language