Directories ¶
Path | Synopsis |
---|---|
assertions
|
|
example1
Sample program demonstrating when implicit interface conversions are provided by the compiler.
|
Sample program demonstrating when implicit interface conversions are provided by the compiler. |
example2
Sample program demonstrating that type assertions are a runtime and not compile time construct.
|
Sample program demonstrating that type assertions are a runtime and not compile time construct. |
example3
Sample program to show how method sets can affect behavior.
|
Sample program to show how method sets can affect behavior. |
decoupling
|
|
example1
Sample program demonstrating struct composition.
|
Sample program demonstrating struct composition. |
example2
Sample program demonstrating decoupling with interfaces.
|
Sample program demonstrating decoupling with interfaces. |
example3
Sample program demonstrating interface composition.
|
Sample program demonstrating interface composition. |
example4
Sample program demonstrating decoupling with interface composition.
|
Sample program demonstrating decoupling with interface composition. |
example5
Sample program demonstrating removing interface pollution.
|
Sample program demonstrating removing interface pollution. |
example6
Sample program demonstrating being more precise with API design.
|
Sample program demonstrating being more precise with API design. |
exercises
|
|
exercise1
Using the template, declare a set of concrete types that implement the set of predefined interface types.
|
Using the template, declare a set of concrete types that implement the set of predefined interface types. |
grouping
|
|
example1
This is an example of using type hierarchies with a OOP pattern.
|
This is an example of using type hierarchies with a OOP pattern. |
example2
This is an example of using composition and interfaces.
|
This is an example of using composition and interfaces. |
mocking
|
|
example1
Sample program to show how you can personally mock concrete types when you need to for your own packages or tests.
|
Sample program to show how you can personally mock concrete types when you need to for your own packages or tests. |
example1/pubsub
Package pubsub simulates a package that provides publication/subscription type services.
|
Package pubsub simulates a package that provides publication/subscription type services. |
pollution
|
|
example1
This is an example that creates interface pollution by improperly using an interface when one is not needed.
|
This is an example that creates interface pollution by improperly using an interface when one is not needed. |
example2
This is an example that removes the interface pollution by removing the interface and using the concrete type directly.
|
This is an example that removes the interface pollution by removing the interface and using the concrete type directly. |
Click to show internal directories.
Click to hide internal directories.