<commit_before># godis

godis - a [Redis](http://redis.io) client for Go.

## Description

The godis package implements a client for Redis. It supports all
redis commands and common features such
as pipelines and pubsub.

  - [Package docs](http://susr.org/godis/pkg/)
  - [Readme](http://susr.org/godis/)

## Install

Use either goinstall or git to make to install the package.

### goinstall

Use [goinstall](http://golang.org/cmd/goinstall/) to download and install the
client with one command.

    $ goinstall github.com/simonz05/godis

goinstall installs godis in the $GOROOT/src/pkg/github.com/simonz05
directory. You can now import godis with `import
"github.com/simonz05/godis"`

### git

The [godis source code](https://github.com/simonz05/godis) is available at
github.com and can be checked out using git.

    $ git clone git://github.com/simonz05/godis.git

To compile it we only need to run make. 

    $ make install

You can now import godis with `import "godis"`.

## Examples

To get and run the examples use the git install method explained in
the section above.

    package main

    import (
        "godis"
        "fmt"
    )

    func main() {
        // new client on default port 6379, select db 0 and use no password
        c := godis.New("", 0, "") 

        // set the key "foo" to "Hello Redis"
        c.Set("foo", "Hello Redis")

        // retrieve the value of "foo". Returns an Elem obj
        elem, _ := c.Get("foo")

        // convert the obj to a string and print it 
        fmt.Println("foo: ", elem.String())
    }

To test this example go to the example/ directory.

    $ cd example/
    $ make string

By running make we got an executable called `string`.

    $ ./string
    foo: Hello Redis

If your redis-server isn't running the output looks like this.

    $ ./string 
    Connection error 127.0.0.1:6379

## Docs

This readme file as well as all the [package
docs](http://susr.org/godis/pkg/) for all the commands is available at
is available on [susr.org/godis](http://susr.org/godis/)

## TODO

  * Add tests for sorted set and server commands.
  * Implement transactions.
  * Pipeline need more testing.
  * Multi.

## Acknowledgment

The work on this client started as I was hacking around on <NAME>'s
original redis client for Go. Also the recent work done by <NAME> on his
client gave me some pointers how to better handle return values. <commit_msg>remove duplicate info in readme<commit_after># godis

godis - a [Redis](http://redis.io) client for Go.

## Description

The godis package implements a client for Redis. It supports all
redis commands and common features such
as pipelines and pubsub.

  - [Package docs](http://susr.org/godis/pkg/)
  - [Readme](http://susr.org/godis/)

## Install

Use either goinstall or git to make to install the package.

### goinstall

Use [goinstall](http://golang.org/cmd/goinstall/) to download and install the
client with one command.

    $ goinstall github.com/simonz05/godis

goinstall installs godis in the $GOROOT/src/pkg/github.com/simonz05
directory. You can now import godis with `import
"github.com/simonz05/godis"`

### git

The [godis source code](https://github.com/simonz05/godis) is available at
github.com and can be checked out using git.

    $ git clone git://github.com/simonz05/godis.git

To compile it we only need to run make. 

    $ make install

You can now import godis with `import "godis"`.

## Examples

To get and run the examples use the git install method explained in
the section above.

    package main

    import (
        "godis"
        "fmt"
    )

    func main() {
        // new client on default port 6379, select db 0 and use no password
        c := godis.New("", 0, "") 

        // set the key "foo" to "Hello Redis"
        c.Set("foo", "Hello Redis")

        // retrieve the value of "foo". Returns an Elem obj
        elem, _ := c.Get("foo")

        // convert the obj to a string and print it 
        fmt.Println("foo: ", elem.String())
    }

To test this example go to the example/ directory.

    $ cd example/
    $ make string

By running make we got an executable called `string`.

    $ ./string
    foo: Hello Redis

If your redis-server isn't running the output looks like this.

    $ ./string 
    Connection error 127.0.0.1:6379

## TODO

  * Add tests for sorted set and server commands.
  * Implement transactions.
  * Pipeline need more testing.
  * Multi.

## Acknowledgment

The work on this client started as I was hacking around on Michael Hoisie's
original redis client for Go. Also the recent work done by <NAME> on his
client gave me some pointers how to better handle return values. 
{'fraction_non_alphanumeric': 0.09667738478027867, 'fraction_numerical': 0.011146838156484458, 'mean_word_length': 2.824590163934426, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6660079', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1392, 'n_words': 585}