about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cmd/build/main.go4
-rw-r--r--internal/builder/builder.go2
-rw-r--r--internal/server/server.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/cmd/build/main.go b/cmd/build/main.go
index d39ddf3..08bf10e 100644
--- a/cmd/build/main.go
+++ b/cmd/build/main.go
@@ -12,8 +12,8 @@ import (
 )
 
 func main() {
-	ioConfig := builder.IOConfig{}
-	if help, err := conf.Parse("", &ioConfig); err != nil {
+	ioConfig := &builder.IOConfig{}
+	if help, err := conf.Parse("", ioConfig); err != nil {
 		if errors.Is(err, conf.ErrHelpWanted) {
 			fmt.Println(help)
 			os.Exit(1)
diff --git a/internal/builder/builder.go b/internal/builder/builder.go
index 0bf6cb2..256d422 100644
--- a/internal/builder/builder.go
+++ b/internal/builder/builder.go
@@ -244,7 +244,7 @@ func build(outDir string, config *config.Config) (*Result, error) {
 	return r, nil
 }
 
-func BuildSite(ioConfig IOConfig, cfg *config.Config) (*Result, error) {
+func BuildSite(ioConfig *IOConfig, cfg *config.Config) (*Result, error) {
 	if cfg == nil {
 		var err error
 		cfg, err = config.GetConfig()
diff --git a/internal/server/server.go b/internal/server/server.go
index aa979f4..044b64f 100644
--- a/internal/server/server.go
+++ b/internal/server/server.go
@@ -107,7 +107,7 @@ func serverHeaderHandler(wrappedHandler http.Handler) http.Handler {
 	})
 }
 
-func rebuild(builderConfig builder.IOConfig, config *cfg.Config) error {
+func rebuild(builderConfig *builder.IOConfig, config *cfg.Config) error {
 	r, err := builder.BuildSite(builderConfig, config)
 	if err != nil {
 		return errors.WithMessage(err, "could not build site")
@@ -146,7 +146,7 @@ func New(runtimeConfig *Config) (*Server, error) {
 	listenAddress := net.JoinHostPort(runtimeConfig.ListenAddress, strconv.Itoa(runtimeConfig.Port))
 	top := http.NewServeMux()
 
-	builderConfig := builder.IOConfig{
+	builderConfig := &builder.IOConfig{
 		Source:      "content",
 		Destination: runtimeConfig.Root,
 		Development: runtimeConfig.Development,