all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
9
Task/Singleton/Go/singleton-1.go
Normal file
9
Task/Singleton/Go/singleton-1.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
package singlep
|
||||
|
||||
// package level data declarations serve as singleton instance variables
|
||||
var X, Y int
|
||||
|
||||
// package level functions serve as methods for a package-as-a-singleton
|
||||
func F() int {
|
||||
return Y - X
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue