I have these two files:
daoFactory.go
package dao
import "sync"
type daoFactory struct {}
var instance *daoFactory
//some functions
fakeProvisionDao.go
package dao
import (
"sync"
"model"
)
type provisionDao struct {
}
var instance *provisionDao
//some functions
Both are in the same package: dao
.
I get this error:
"instance" redeclared in this block
Obviously, the cause is that instance
variable is declared in both files. I'm beggining in Go programming and I don't know how should I handle with this error.