From 9ddd2807a13eafbd967f421b0dc4aee55ff2ff6f Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 11 May 2025 17:07:48 +0800 Subject: forged/cmd/forge -> forged We're already separating everything related to the main forge daemon in forged/ so the cmd structure is just a bit redundant at this point. --- Makefile | 2 +- forged/cmd/forge/main.go | 27 --------------------------- forged/main.go | 27 +++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 forged/cmd/forge/main.go create mode 100644 forged/main.go diff --git a/Makefile b/Makefile index d52c3f6..65d6b07 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ EMBED = git2d/git2d hookc/hookc source.tar.gz $(wildcard LICENSE*) $(wildcard fo EMBED_ = $(EMBED:%=forged/internal/embed/%) forge: $(EMBED_) $(SOURCE_FILES) - CGO_ENABLED=0 go build -o forge -ldflags '-extldflags "-f no-PIC -static" -X "go.lindenii.runxiyu.org/forge/forged/internal/unsorted.version=$(VERSION)"' -tags 'osusergo netgo static_build' ./forged/cmd/forge + CGO_ENABLED=0 go build -o forge -ldflags '-extldflags "-f no-PIC -static" -X "go.lindenii.runxiyu.org/forge/forged/internal/unsorted.version=$(VERSION)"' -tags 'osusergo netgo static_build' ./forged utils/colb: diff --git a/forged/cmd/forge/main.go b/forged/cmd/forge/main.go deleted file mode 100644 index fde15d1..0000000 --- a/forged/cmd/forge/main.go +++ /dev/null @@ -1,27 +0,0 @@ -// SPDX-License-Identifier: AGPL-3.0-only -// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu - -// The main entry point to the Lindenii Forge daemon. -package main - -import ( - "flag" - - "go.lindenii.runxiyu.org/forge/forged/internal/unsorted" -) - -func main() { - configPath := flag.String( - "config", - "/etc/lindenii/forge.scfg", - "path to configuration file", - ) - flag.Parse() - - s, err := unsorted.NewServer(*configPath) - if err != nil { - panic(err) - } - - panic(s.Run()) -} diff --git a/forged/main.go b/forged/main.go new file mode 100644 index 0000000..fde15d1 --- /dev/null +++ b/forged/main.go @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu + +// The main entry point to the Lindenii Forge daemon. +package main + +import ( + "flag" + + "go.lindenii.runxiyu.org/forge/forged/internal/unsorted" +) + +func main() { + configPath := flag.String( + "config", + "/etc/lindenii/forge.scfg", + "path to configuration file", + ) + flag.Parse() + + s, err := unsorted.NewServer(*configPath) + if err != nil { + panic(err) + } + + panic(s.Run()) +} -- cgit v1.2.3