Skip to content
Snippets Groups Projects
Commit 61702a19 authored by André Sterba's avatar André Sterba Committed by Neil-Jocelyn Schark
Browse files

Remove external dependency for config handling

parent c5abb2ae
No related branches found
No related tags found
1 merge request!31Remove external dependency for config handling
Pipeline #270793 passed
package config
import (
"github.com/caarlos0/env/v11"
)
type Config struct {
AddrBind string
......@@ -12,10 +8,7 @@ type Config struct {
}
func GetConfig() Config {
cfg, err := env.ParseAs[Config]()
if err != nil {
panic(err)
}
cfg := Config{}
return cfg
}
......@@ -3,7 +3,6 @@ module code.fbi.h-da.de/danet/costaquanta
go 1.24
require (
github.com/caarlos0/env/v11 v11.3.1
github.com/google/uuid v1.6.0
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.1
github.com/stretchr/testify v1.10.0
......
package config
import "github.com/caarlos0/env/v11"
type Config struct {
AddrBind string
CtrlAddr string
......@@ -11,10 +9,7 @@ type Config struct {
}
func GetConfig() Config {
cfg, err := env.ParseAs[Config]()
if err != nil {
panic(err)
}
cfg := Config{}
return cfg
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment