GithubHelp home page GithubHelp logo

redigo-pack's Introduction

redis的使用更简单

说明

基于redigo的封装,写入好配置文件后,在任何地方随时调用,使用起来更简单,代码更优雅 支持和redigo同时使用

安装

go get -u -v github.com/newgoo/redigo-pack

使用

package main

import (
	"fmt"

	"github.com/newgoo/redigo-pack"
)

func init() {
	redigo_pack.NewConnectionWithFile("redis", "./config/config.ini")
}

func main() {
	err := redigo_pack.RedigoConn.String.Set("1", 2, 10).Error()
	if err != nil {
		fmt.Println(err)
		return
	}
	v, err := redigo_pack.RedigoConn.String.Get("1").Int64()
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(v)
}

License

The MIT License.

联系我

如果有不足的地方,需要添加的请联系我 newgoo: [email protected]

感谢

vichuyongqiang提供的list的封装

redigo-pack's People

Contributors

newgoo avatar vichuyongqiang avatar

Stargazers

ttaacc avatar

Watchers

James Cloos avatar

Forkers

cppby1988

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.