diff options
| author | William Hergès <william@herges.fr> | 2025-12-27 18:54:39 +0100 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-12-27 18:54:39 +0100 |
| commit | 87b27187b93912fc22e61fd298606af7d7bce710 (patch) | |
| tree | 6b38f839b00414d8e7e2a3e79908f356c14a5f26 | |
| parent | 7223c1172448b1a9b2bd8079b56cc84858be2ffc (diff) | |
build(go): remove useless godotenv deps
| -rw-r--r-- | go.mod | 1 | ||||
| -rw-r--r-- | go.sum | 2 | ||||
| -rw-r--r-- | main.go | 17 |
3 files changed, 0 insertions, 20 deletions
@@ -4,7 +4,6 @@ go 1.25.1 require ( github.com/go-chi/chi/v5 v5.2.3 - github.com/joho/godotenv v1.5.1 github.com/pelletier/go-toml/v2 v2.2.4 ) @@ -1,7 +1,5 @@ github.com/go-chi/chi/v5 v5.2.3 h1:WQIt9uxdsAbgIYgid+BpYc+liqQZGMHRaUwp0JUcvdE= github.com/go-chi/chi/v5 v5.2.3/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops= -github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= -github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/mattn/go-sqlite3 v1.14.32 h1:JD12Ag3oLy1zQA+BNn74xRgaBbdhbNIDYvQUEuuErjs= github.com/mattn/go-sqlite3 v1.14.32/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= @@ -10,13 +10,11 @@ import ( "net/http" "os" "os/signal" - "strconv" "syscall" "time" "git.anhgelus.world/anhgelus/small-web/backend" "git.anhgelus.world/anhgelus/small-web/backend/storage" - "github.com/joho/godotenv" ) //go:embed dist @@ -29,22 +27,7 @@ var ( ) func init() { - err := godotenv.Load(".env") - if err != nil && !errors.Is(err, os.ErrNotExist) { - slog.Error("loading .env", "error", err) - } - - if v := os.Getenv("CONFIG_FILE"); v != "" { - configFile = v - } flag.StringVar(&configFile, "config", configFile, "config file") - - if v := os.Getenv("PORT"); v != "" { - port, err = strconv.Atoi(v) - if err != nil { - panic(err) - } - } flag.IntVar(&port, "port", port, "server port") flag.BoolVar(&dev, "dev", false, "development mode") } |
