about summary refs log tree commit diff stats
path: root/cmd/build/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/build/main.go')
-rw-r--r--cmd/build/main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/build/main.go b/cmd/build/main.go
index 9b6a79b..069f9bd 100644
--- a/cmd/build/main.go
+++ b/cmd/build/main.go
@@ -7,6 +7,8 @@ import (
 	"log/slog"
 	"os"
 
+	"website/internal/builder"
+
 	"github.com/BurntSushi/toml"
 	"github.com/ardanlabs/conf/v3"
 	"github.com/pkg/errors"
@@ -16,9 +18,11 @@ func main() {
 	if os.Getenv("DEBUG") != "" {
 		slog.SetLogLoggerLevel(slog.LevelDebug)
 	}
+	log.SetFlags(log.LstdFlags | log.Lmsgprefix)
+	log.SetPrefix("build: ")
 	slog.Debug("starting build process")
 
-	ioConfig := IOConfig{}
+	ioConfig := builder.IOConfig{}
 	if help, err := conf.Parse("", &ioConfig); err != nil {
 		if errors.Is(err, conf.ErrHelpWanted) {
 			fmt.Println(help)
@@ -34,7 +38,7 @@ func main() {
 		}
 	}
 
-	if err := buildSite(ioConfig); err != nil {
+	if err := builder.BuildSite(ioConfig); err != nil {
 		switch cause := errors.Cause(err).(type) {
 		case *fs.PathError:
 			slog.Info("pathError")