gin-contrib / gin-contrib/cache

how to use the func "Dial" in other package

Open
#45 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
456
Forks
100
Avg merge
2h 16m
Merged PRs (30d)
2

Description

https://github.com/gin-contrib/cache/blob/031ec46e6ce8b5a0e0302dca3a8dbf9b44cd10b4/persistence/redis.go#L22

	rs = persistence.NewRedisCache(host, password, 0)
	c, err := rs.pool.Dial()
	if err != nil {
		global.Log.Println(err)
		global.Log.Fatalf("open redis connection error")
	}
`` ``
tip: "rs.pool undefined (cannot refer to unexported field or method pool)"
thx

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with persistence/redis.go at line 22 and inspect how NewRedisCache exposes the Redis connection. Clarify the supported way to use Dial from another package, or document that usage if supported; done means the example no longer relies on the inaccessible rs.pool field.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, redis
Domain
databases
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.