Cybersecurity-Projects/PROJECTS/intermediate/security-news-scraper/cmd/nadezhda/stubs.go

36 lines
816 B
Go

// ©AngelaMos | 2026
// stubs.go
package main
import (
"fmt"
"github.com/spf13/cobra"
)
func notImplemented(milestone string) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
return fmt.Errorf("%s is not implemented yet (%s)", cmd.Name(), milestone)
}
}
func init() {
stubs := []struct {
use string
short string
milestone string
}{
{"tui", "Browse aggregated news in an interactive terminal UI", "milestone M5"},
{"ideate", "Generate content angles from ranked clusters via an AI provider", "milestone M6"},
{"watch", "Run as a daemon, re-ingesting on an interval", "milestone M7"},
}
for _, s := range stubs {
rootCmd.AddCommand(&cobra.Command{
Use: s.use,
Short: s.short,
RunE: notImplemented(s.milestone),
})
}
}