mirror of
https://github.com/tnypxl/rollup.git
synced 2025-12-15 06:53:18 +00:00
fix: Use logger instead of log. Move web subcommand initialization to root.go
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
config "github.com/tnypxl/rollup/internal/config"
|
||||
)
|
||||
@@ -33,4 +31,5 @@ func init() {
|
||||
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enable verbose logging")
|
||||
|
||||
rootCmd.AddCommand(filesCmd)
|
||||
rootCmd.AddCommand(webCmd)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ var webCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(webCmd)
|
||||
webCmd.Flags().StringSliceVarP(&urls, "urls", "u", []string{}, "URLs of the webpages to scrape (comma-separated)")
|
||||
webCmd.Flags().StringVarP(&outputType, "output", "o", "single", "Output type: 'single' for one file, 'separate' for multiple files")
|
||||
webCmd.Flags().IntVarP(&depth, "depth", "d", 0, "Depth of link traversal (default: 0, only scrape the given URLs)")
|
||||
|
||||
Reference in New Issue
Block a user