Skip to content

Commit 58f7b3c

Browse files
Lairon Acosta GuardiasLairon Acosta Guardias
authored andcommitted
updating package name
1 parent a345750 commit 58f7b3c

File tree

10 files changed

+20
-19
lines changed

10 files changed

+20
-19
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
# Database: Postgresql, Redis, etc.
2-
This project shows the implementation of clients for postgresql, Redis and other databases in Golang.
1+
# Kit
2+
Set of common packages used by all or most projects in my repositories.
33

44
## Table of Contents
55

6-
- [Implementation](#implementation)
6+
- [Implementation examples](#implementation-examples)
77
- [Postgresql](#postgresql)
88
- [Redis](#redis)
99

10-
## Implementation
10+
## Implementation examples
1111

1212
### Postgresql
1313

14-
See the examples already implemented in the folder `/pgdb`.
14+
See the examples already implemented in the folder `/postgresql`.
1515

1616
### Redis
1717

18-
See the examples already implemented in the folder `/redisdb`.
18+
See the examples already implemented in the folder `/redis`.
19+
20+
lairon14@gmail.com
21+
-- Lairon

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/Lairon/db-go
1+
module github.com/laironacosta/kit-go
22

33
go 1.16
44

@@ -7,5 +7,4 @@ require (
77
github.com/go-redis/redis/v8 v8.8.0
88
github.com/sirupsen/logrus v1.8.1
99
github.com/stretchr/testify v1.7.0
10-
golang.org/x/sys v0.0.0-20210402192133-700132347e07 // indirect
1110
)

go.sum

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w
132132
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
133133
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
134134
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
135+
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 h1:EZ2mChiOa8udjfp6rRmswTbtZN/QzUQp4ptM4rnjHvc=
135136
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
136-
golang.org/x/sys v0.0.0-20210402192133-700132347e07 h1:4k6HsQjxj6hVMsI2Vf0yKlzt5lXxZsMW1q0zaq2k8zY=
137-
golang.org/x/sys v0.0.0-20210402192133-700132347e07/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
138137
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
139138
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
140139
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package main
22

33
import (
4-
"github.com/Lairon/db-go/pgdb"
54
"github.com/go-pg/pg/v10"
65
"github.com/go-pg/pg/v10/orm"
6+
pgKit "github.com/laironacosta/kit-go/postgresql"
77
log "github.com/sirupsen/logrus"
88
)
99

@@ -33,7 +33,7 @@ func main() {
3333

3434
func NewPgClient() *PgClient {
3535
return &PgClient{
36-
db: pgdb.NewPgDB(&pg.Options{
36+
db: pgKit.NewPgDB(&pg.Options{
3737
User: "root",
3838
Password: "root",
3939
Database: "db-test",

pgdb/pg_db.go renamed to postgresql/pg_db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package pgdb
1+
package postgresql
22

33
import (
44
"github.com/go-pg/pg/v10"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package pgdb
1+
package postgresql
22

33
import (
44
"github.com/go-pg/pg/v10"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package main
22

33
import (
44
"context"
5-
"github.com/Lairon/db-go/redisdb"
65
"github.com/go-redis/redis/v8"
6+
redisKit "github.com/laironacosta/kit-go/redis"
77
log "github.com/sirupsen/logrus"
88
"time"
99
)
@@ -29,7 +29,7 @@ func main() {
2929

3030
func NewRedisClient() *RedisClient {
3131
return &RedisClient{
32-
db: redisdb.NewRedisDB(&redis.Options{
32+
db: redisKit.NewRedisDB(&redis.Options{
3333
Addr: "redis-test:6379",
3434
Password: "", // no password set
3535
DB: 0, // use default DB
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package redisdb
1+
package redis
22

33
import (
44
"context"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package redisdb
1+
package redis
22

33
import (
44
"github.com/go-redis/redis/v8"
@@ -7,7 +7,7 @@ import (
77
)
88

99
var redisOptions = &redis.Options{
10-
Addr: "redis:6379",
10+
Addr: "redis-test:6379",
1111
Password: "",
1212
DB: 0,
1313
}

0 commit comments

Comments
 (0)