go-patterns icon indicating copy to clipboard operation
go-patterns copied to clipboard

import "sync" missing in singleton example

Open 030 opened this issue 8 years ago • 2 comments

The singleton code does not run

singleton\singleton.go:6: undefined: sync in sync.Once

unless

import "sync"

is added

030 avatar Jul 19 '17 12:07 030

@030 Hi. You imported "sync" package? Check that.

P.s. Please provide more information next time :)

LinMAD avatar Jul 20 '17 06:07 LinMAD

@LinMAD updated

030 avatar Jul 20 '17 08:07 030