Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock represents clock with hour and minute
Example (Compare) ¶
// a new clock clock1 := New(10, 30) // a second clock, same as the first clock2 := New(10, 30) // are the clocks equal? fmt.Println(clock2 == clock1) // change the second clock clock2 = clock2.Add(30) // are the clocks equal now? fmt.Println(clock2 == clock1)
Output: true false
Example (New) ¶
// a new clock clock1 := New(10, 30) fmt.Println(clock1.String())
Output: 10:30
Click to show internal directories.
Click to hide internal directories.