quii / learn-go-with-tests

Learn Go with test-driven development
MIT License
22.03k stars 2.79k forks source link

Add example of calling generic constructor with type that cannot be inferred #778

Open VillePuuska opened 3 months ago

VillePuuska commented 3 months ago

For issue #770

As an example of how to specify types when calling a function with a generic type that cannot be inferred, added a constructor for Stack[T] to Generics chapter. Added to text and code.