Documentation
¶
Overview ¶
Package singleton implements the Singleton design pattern. The example demonstrates the usability of the Notepad struct, that can be used in different places in the application through the GetTodoNotepad singleton creating method.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Notepad ¶
type Notepad struct {
// contains filtered or unexported fields
}
Notepad represents the object, that encapsulates the logic of adding and printing the notes into it
func GetTodoNotepad ¶
func GetTodoNotepad() *Notepad
GetTodoNotepad is the Singleton constructor for the Todo list notepad, that can be reused in different places of the application
Click to show internal directories.
Click to hide internal directories.