golang에서 Redis를 사용할 때는 보통 go-redis 라이브러리를 많이 사용합니다. 이 때, 바로 메서드를 사용하기 보다는 내부 비즈니스 로직이 포함된 RedisClient 인터페이스를 만들어 사용하곤 하는데요. 아래는 그 예시 입니다. redis.go package main import ( "context" "fmt" "github.com/go-redis/redis/v8" // go-redis import ) // RedisClientInterface 인터페이스 정의 type RedisClientInterface interface { Set(key string, value interface{}) error Get(key string) (string, error) } // RedisClient ..