Skip to content

Commit

Permalink
creational/singleton: group variable declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrts committed Jan 13, 2017
1 parent a523c5f commit dc42cd7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions creational/singleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ package singleton

type singleton map[string]string

var once sync.Once
var (
once sync.Once

var instance singleton
instance singleton
)

func New() singleton {
once.Do(func() {
Expand Down

0 comments on commit dc42cd7

Please sign in to comment.