refactored render to internal/render added logging with charmbracelet/log
This commit is contained in:
parent
109c54f1e5
commit
6f0b534d8d
20 changed files with 356 additions and 13 deletions
10
cmd/root.go
10
cmd/root.go
|
|
@ -1,10 +1,10 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"specCon18/bubblewand/render"
|
||||
"specCon18/bubblewand/internal/render"
|
||||
"specCon18/bubblewand/internal/logger"
|
||||
|
||||
)
|
||||
|
||||
// CLI flag variables
|
||||
|
|
@ -13,7 +13,7 @@ var (
|
|||
packageName string
|
||||
programVersion string
|
||||
programDesc string
|
||||
outputDir string // NEW: output directory flag
|
||||
outputDir string
|
||||
)
|
||||
|
||||
// rootCmd renders templates using CLI flags
|
||||
|
|
@ -31,7 +31,7 @@ var rootCmd = &cobra.Command{
|
|||
|
||||
// Render templates to the specified output directory
|
||||
if err := render.RenderTemplates(data, outputDir); err != nil {
|
||||
log.Fatalf("rendering failed: %v", err)
|
||||
logger.Log.Fatalf("rendering failed: %v",err)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue