<commit_before>package mantle

import (
        "string"
        "./backends/redis"
        "./backends/memcache"
)

type Mantle interface{
        Connect()
        Get(key interface{}) interface{}
        Set(key interface{}, value interface{}) bool
        MGet(key ...interface{}) map[interface{}]interface{}
        MSet(k_v_map map[interface{}]interface{}) bool
        Expire(keys ...interface{}) bool
}

type Orm struct{
        driver string
        host string
        port string
}

func (o *Orm) Get() interface{}{
        if o.driver == "memcache" {
                return &Mantle{&Memcache{o.host, o.port}}
        }else{
                return &Mantle{&Redis{o.host, o.port}}
        }
}


func main(){
        driver := &Orm{}
        driver.Get()
        /*
        connection = driver.Connect()
        connection.Get("key") //returns value
        connection.Set("key", "value") //returns true or false
        connection.MGet(["key1", "key2", "key3"]) // returns map of k v
        connection.MSet(["key"]"value") //returns true or false
        */
}
<commit_msg>fixing mantle.go<commit_after>package main

import (
        "./backends/redis"
        //"./backends/memcache"
        "fmt"
)

type Mantle interface{
        Connect()
        Get(key string) string
        Set(key string, value interface{}) bool
        //MGet(key ...interface{}) map[interface{}]interface{}
        //MSet(k_v_map map[interface{}]interface{}) bool
        //Expire(keys ...interface{}) bool
}


type Orm struct{
        driver string
        Host string
        Port string
}

func (o *Orm) Get() Mantle{
        if o.driver == "" {
                return Mantle(&mantle.Redis{Host : "", Port : ""})
        }else{
                return Mantle(&mantle.Redis{Host : "", Port : ""})
        }
}


func main(){
        orm := &Orm{Host: "", Port: ""}
        driver := orm.Get()
        driver.Connect()
        driver.Set("key", "value")
        fmt.Println(driver.Get("key"))
        driver.Set("key", "value1")
        fmt.Println(driver.Get("key"))
/*
        connection = driver.Connect()
        connection.Get("key") //returns value
        connection.Set("key", "value") //returns true or false
        connection.MGet(["key1", "key2", "key3"]) // returns map of k v
        connection.MSet(["key"]"value") //returns true or false
*/
}
{'fraction_non_alphanumeric': 0.16162046908315564, 'fraction_numerical': 0.0029850746268656717, 'mean_word_length': 2.0310077519379846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4681877', 'n_tokens_mistral': 720, 'n_tokens_neox': 705, 'n_words': 169}