func getRethinkClient() (store.Client, error) { address, err := getRethinkAddress() if err != nil { return nil, err } databaseName := strings.Replace(uuid.NewV4().String(), "-", "", -1) if err := store.InitDBs(address, databaseName); err != nil { return nil, err } return store.NewRethinkClient(address, databaseName) }
func getRethinkClient(address string, databaseName string) (store.Client, error) { var err error if address == "" { address, err = getRethinkAddress() if err != nil { return nil, err } } if err := store.InitDBs(address, databaseName); err != nil { return nil, err } return store.NewRethinkClient(address, databaseName) }