Storage 和redis 有什么关系啊,我的redis 是nil
log.Printf("connect to redis (addr: %s password: %s db: %d)", addr, passwd, db) r := NewRedisCli(addr, passwd, db) return &Env{S: r}
type Storage interface { Shorten(url string, exp int64) (string, error) ShortlinkInfo(eid string) (interface{}, error) Unshorten(eid string) (string, error) }
type Env struct { S Storage }