From 772ce9a7b7a6ca71ecfa76b3d7fe55d6a16964a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20P=C3=A9rez?= Date: Fri, 10 Oct 2025 01:49:39 +0200 Subject: [PATCH] add tdlr --- Makefile | 6 +++++- README.md | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2ba753b..77c4d75 100644 --- a/Makefile +++ b/Makefile @@ -26,10 +26,14 @@ migrateup: go run -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest -path app/database -database "postgresql://developer:secret@localhost:5432/$(DB_NAME)?sslmode=disable" -verbose up .PHONY: mock -#Mock database +# Mock database mock: go run go.uber.org/mock/mockgen@latest -package mock -destination internal/domains/sensors/mock/querier.go $(MOD_NAME)/internal/domains/sensors Repository +.PHONY: test +# Run tests +tests: + go test ./... .PHONY: run # Start app in development environment diff --git a/README.md b/README.md index 8f0a031..dd1da66 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,11 @@ Lectura de datos de sensores en un dispositivo IoT. Prueba técnica para optar por el puesto de programador Go. +## TL:DR + +- make lazy-start +- abre terminal y escribe: `nats sub sensors.data.*` + ## Requisitos previos - Docker