Simple example of stack implementation with code generation and generics.
Example of generation of stack for type int
:
go run stack-generator.go -o stack-int.go -p main -n Int -t int
See go run stack-generator.go --help
for usage details.
Example of generic stack usage:
s := Stack[int]{}