go-code-gen-vs-generics

command module
v0.0.0-...-75f9fe3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 1 Imported by: 0

README

Go: Code Generation VS Generics

Simple example of stack implementation with code generation and generics.

Usage

Code Generation

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.

Generic Stack

Example of generic stack usage:

s := Stack[int]{}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL