func CreateRedisRecord(network, location string) RedisRecorder { conn := redis.Redis{ Network: network, Location: location, } if !conn.Connect() { fmt.Println("Redis connection fail!\nNetwork: ", network, " Location: ", location) os.Exit(1) } fmt.Println("Redis Recorder Connected") return RedisRecorder{conn: &conn} }