From dc42cd7206a9cb778f838b55c1b0ed4e15cc541f Mon Sep 17 00:00:00 2001 From: Tamer Tas Date: Fri, 13 Jan 2017 09:34:48 +0300 Subject: [PATCH] creational/singleton: group variable declarations --- creational/singleton.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/creational/singleton.md b/creational/singleton.md index fa6c463..632cdf8 100644 --- a/creational/singleton.md +++ b/creational/singleton.md @@ -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() {