summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-02 18:23:04 +0100
committerJulien Dessaux2025-01-02 18:23:04 +0100
commit99ff8441dae1f3784d6b756fb55d4f128338aa8c (patch)
treebae5da8a1d36555d910235d9a681db2370f4d369
parentchore(tfstated): prepare for listening on a second port (diff)
downloadtfstated-99ff8441dae1f3784d6b756fb55d4f128338aa8c.tar.gz
tfstated-99ff8441dae1f3784d6b756fb55d4f128338aa8c.tar.bz2
tfstated-99ff8441dae1f3784d6b756fb55d4f128338aa8c.zip
chore(tfstated): code cleanup
-rw-r--r--cmd/tfstated/main.go10
-rw-r--r--pkg/backend/run.go5
2 files changed, 1 insertions, 14 deletions
diff --git a/cmd/tfstated/main.go b/cmd/tfstated/main.go
index 02ddad3..8b462f7 100644
--- a/cmd/tfstated/main.go
+++ b/cmd/tfstated/main.go
@@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
- "io"
"log/slog"
"os"
"os/signal"
@@ -12,16 +11,13 @@ import (
"git.adyxax.org/adyxax/tfstated/pkg/backend"
"git.adyxax.org/adyxax/tfstated/pkg/database"
+ "git.adyxax.org/adyxax/tfstated/pkg/webui"
)
func run(
ctx context.Context,
db *database.DB,
- //args []string,
getenv func(string) string,
- //stdin io.Reader,
- //stdout io.Writer,
- stderr io.Writer,
) error {
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)
defer cancel()
@@ -79,11 +75,7 @@ func main() {
if err := run(
ctx,
db,
- //os.Args,
os.Getenv,
- //os.Stdin,
- //os.Stdout,
- os.Stderr,
); err != nil {
fmt.Fprintf(os.Stderr, "%+v\n", err)
os.Exit(1)
diff --git a/pkg/backend/run.go b/pkg/backend/run.go
index a6d2f03..2af47ab 100644
--- a/pkg/backend/run.go
+++ b/pkg/backend/run.go
@@ -2,7 +2,6 @@ package backend
import (
"context"
- "io"
"log/slog"
"net"
"net/http"
@@ -14,11 +13,7 @@ import (
func Run(
ctx context.Context,
db *database.DB,
- //args []string,
getenv func(string) string,
- //stdin io.Reader,
- //stdout io.Writer,
- stderr io.Writer,
) *http.Server {
mux := http.NewServeMux()
addRoutes(