diff options
Diffstat (limited to 'nix/buildTypedGo/example/main.go2')
-rw-r--r-- | nix/buildTypedGo/example/main.go2 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/nix/buildTypedGo/example/main.go2 b/nix/buildTypedGo/example/main.go2 new file mode 100644 index 000000000000..8986f57b94c7 --- /dev/null +++ b/nix/buildTypedGo/example/main.go2 @@ -0,0 +1,15 @@ +package main + +import ( + "fmt" +) + +func Print(type T)(s []T) { + for _, v := range s { + fmt.Print(v) + } +} + +func main() { + Print([]string{"Hello, ", "TVL\n"}) +} |