diff options
author | Alan Pearce | 2024-06-25 20:23:50 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-25 20:23:50 +0200 |
commit | 17db1a29b12487c8ae596a9be108fd3563e5e47d (patch) | |
tree | e86ff19c84c1ddf0acceffa8866adfd67b5cbc0e | |
parent | 2841eea86e8ac39d63502ac253eab09c1425c13e (diff) | |
download | website-17db1a29b12487c8ae596a9be108fd3563e5e47d.tar.lz website-17db1a29b12487c8ae596a9be108fd3563e5e47d.tar.zst website-17db1a29b12487c8ae596a9be108fd3563e5e47d.zip |
simplify build command
-rw-r--r-- | cmd/build/main.go | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/cmd/build/main.go b/cmd/build/main.go index d6b44d4..ee61a68 100644 --- a/cmd/build/main.go +++ b/cmd/build/main.go @@ -2,13 +2,11 @@ package main import ( "fmt" - "io/fs" "os" "website/internal/builder" "website/internal/log" - "github.com/BurntSushi/toml" "github.com/ardanlabs/conf/v3" "github.com/pkg/errors" ) @@ -31,20 +29,9 @@ func main() { log.Panic("could not change to source directory") } } - r, err := builder.BuildSite(ioConfig) + _, err := builder.BuildSite(ioConfig) if err != nil { - switch cause := errors.Cause(err).(type) { - case *fs.PathError: - log.Error("path error", "error", err) - case toml.ParseError: - log.Info("parse error", "error", err) - default: - log.Info("other error", "error", err, "cause", errors.Cause(cause)) - } + log.Error("could not build site", "error", err) os.Exit(1) } - - for _, h := range r.Hashes { - fmt.Printf("'%s'\n", h) - } } |