Added godotenv
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/joho/godotenv"
|
||||||
"github.com/robindittmar/dttmr-api/internal/api/router"
|
"github.com/robindittmar/dttmr-api/internal/api/router"
|
||||||
"github.com/robindittmar/dttmr-api/internal/telemetry"
|
"github.com/robindittmar/dttmr-api/internal/telemetry"
|
||||||
)
|
)
|
||||||
@@ -25,6 +26,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func run(serviceName string, serviceVersion string) error {
|
func run(serviceName string, serviceVersion string) error {
|
||||||
|
_ = godotenv.Load(".env")
|
||||||
|
|
||||||
baseHandler := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
|
baseHandler := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
|
||||||
Level: slog.LevelInfo,
|
Level: slog.LevelInfo,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ module github.com/robindittmar/dttmr-api
|
|||||||
go 1.26
|
go 1.26
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
github.com/joho/godotenv v1.5.1
|
||||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
|
||||||
go.opentelemetry.io/otel v1.44.0
|
go.opentelemetry.io/otel v1.44.0
|
||||||
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0
|
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0
|
||||||
|
|||||||
Reference in New Issue
Block a user