func (s *setupStruct) setupRethink() { cfg := s.Config re, err := rethink.NewInstance(gorethink.ConnectOpts{ Address: cfg.RethinkDB.Addr + ":" + cfg.RethinkDB.Port, Database: cfg.RethinkDB.DBName, }) if err != nil { l.Fatalln("Could not connect to RethinkDB") } s.Rethink = re }
func (s *setupStruct) setupRethink() { cfg := s.Config re, err := rethink.NewInstance(gorethink.ConnectOpts{ Address: cfg.RethinkDB.Addr + ":" + cfg.RethinkDB.Port, Database: cfg.RethinkDB.DBName, }) if err != nil { l.Fatalln("Could not connect to RethinkDB") } s.Rethink = re script := dbscript.NewRethinkScript(s.Rethink, s.Config.RethinkDB.DBName) if err := script.Setup(); err != nil { l.Fatalln("Error generating data", err) } }