diff --git a/lectures/07-sql/hasql/open.go b/lectures/07-sql/hasql/open.go index bfc1427..bdc1e51 100644 --- a/lectures/07-sql/hasql/open.go +++ b/lectures/07-sql/hasql/open.go @@ -1,7 +1,10 @@ package hasql import ( + "context" + "database/sql" "log" + "time" _ "github.com/jackc/pgx/v4/stdlib" "golang.yandex/hasql" @@ -24,7 +27,7 @@ func Open() { log.Fatal(err) } - log.Println("Node address", node.Addr) + log.Println("Node address", node.Addr()) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() diff --git a/lectures/07-sql/redis/redis.go b/lectures/07-sql/redis/redis.go index fb42014..28d956c 100644 --- a/lectures/07-sql/redis/redis.go +++ b/lectures/07-sql/redis/redis.go @@ -1,6 +1,7 @@ package redis import ( + "context" "log" "time"