aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod1
-rw-r--r--go.sum2
-rw-r--r--main.go17
3 files changed, 0 insertions, 20 deletions
diff --git a/go.mod b/go.mod
index 13cb181..57f1eb7 100644
--- a/go.mod
+++ b/go.mod
@@ -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
)
diff --git a/go.sum b/go.sum
index 08fbffe..988c108 100644
--- a/go.sum
+++ b/go.sum
@@ -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=
diff --git a/main.go b/main.go
index b1a192e..d983ff5 100644
--- a/main.go
+++ b/main.go
@@ -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")
}