Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions apps/uno/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/echo-webkom/cenv"
cenv "github.com/echo-webkom/cenv/clients/cenv-go"
)

type Environment string
Expand Down Expand Up @@ -67,7 +67,10 @@ type CronConfig struct {
func Load() *Config {
env := strings.ToLower(os.Getenv("ENVIRONMENT"))
if strings.HasPrefix(env, "dev") {
if err := cenv.VerifyEx("../../.env", "../../cenv.schema.json"); err != nil {
if err := cenv.Check(&cenv.Config{
EnvPath: "../../.env",
SchemaPath: "../../cenv.schema.toml",
}); err != nil {
log.Println(err)
}
}
Expand Down Expand Up @@ -103,7 +106,10 @@ func LoadCronConfig() *CronConfig {
environment := parseEnvironment(os.Getenv("ENVIRONMENT"))

if environment == Development {
if err := cenv.VerifyEx("../../.env", "../../cenv.schema.json"); err != nil {
if err := cenv.Check(&cenv.Config{
EnvPath: "../../.env",
SchemaPath: "../../cenv.schema.toml",
}); err != nil {
log.Println(err)
}
}
Expand Down
2 changes: 2 additions & 0 deletions apps/uno/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ require (
require (
dario.cat/mergo v1.0.2 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/andybalholm/brotli v1.2.0 // indirect
Expand Down Expand Up @@ -62,6 +63,7 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/ebitengine/purego v0.10.0 // indirect
github.com/echo-webkom/cenv/clients/cenv-go v0.0.0-20260321111632-75786e3ef6ac // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
Expand Down
4 changes: 4 additions & 0 deletions apps/uno/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEK
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69 h1:+tu3HOoMXB7RXEINRVIpxJCT+KdYiI7LAEAUrOw3dIU=
github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69/go.mod h1:L1AbZdiDllfyYH5l5OkAaZtk7VkWe89bPJFmnDBNHxg=
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/JohannesKaufmann/dom v0.2.0 h1:1bragmEb19K8lHAqgFgqCpiPCFEZMTXzOIEjuxkUfLQ=
github.com/JohannesKaufmann/dom v0.2.0/go.mod h1:57iSUl5RKric4bUkgos4zu6Xt5LMHUnw3TF1l5CbGZo=
github.com/JohannesKaufmann/html-to-markdown/v2 v2.5.0 h1:mklaPbT4f/EiDr1Q+zPrEt9lgKAkVrIBtWf33d9GpVA=
Expand Down Expand Up @@ -124,6 +126,8 @@ github.com/ebitengine/purego v0.10.0 h1:QIw4xfpWT6GWTzaW5XEKy3HXoqrJGx1ijYHzTF0/
github.com/ebitengine/purego v0.10.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ=
github.com/echo-webkom/cenv v1.16.0 h1:Y5rnBKYvZn6QKLZm9xAkgOQPbiEryO9qED0dhnkwvPE=
github.com/echo-webkom/cenv v1.16.0/go.mod h1:qCDFjnypg03McDVq+xBfQKnAAa5FAOI9F4RuTPau7sA=
github.com/echo-webkom/cenv/clients/cenv-go v0.0.0-20260321111632-75786e3ef6ac h1:Ct5Vy5tmE9klSqp6GMWnPic3rH18j/6Aq2xLGNoPVe0=
github.com/echo-webkom/cenv/clients/cenv-go v0.0.0-20260321111632-75786e3ef6ac/go.mod h1:nLfjuqL3yT2XO4yY/OY1n1YCVzoCoguqQ0753hVub/g=
github.com/evanw/esbuild v0.27.2 h1:3xBEws9y/JosfewXMM2qIyHAi+xRo8hVx475hVkJfNg=
github.com/evanw/esbuild v0.27.2/go.mod h1:D2vIQZqV/vIf/VRHtViaUtViZmG7o+kKmlBfVQuRi48=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
Expand Down
Loading