feat: scaffold Go project with cobra CLI, Makefile, and config
Set up the Go module, directory structure, and minimal CLI entrypoint for the awesome-docker Go rewrite. Includes: - cobra-based CLI with version command - Makefile with build/test/lint/check/health/report/clean targets - config/exclude.yaml migrated from tests/exclude_in_test.json - config/website.tmpl.html copied from website/index.tmpl.html - .gitignore updated for Go binary Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
23
cmd/awesome-docker/main.go
Normal file
23
cmd/awesome-docker/main.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func main() {
|
||||
root := &cobra.Command{
|
||||
Use: "awesome-docker",
|
||||
Short: "Quality tooling for the awesome-docker curated list",
|
||||
}
|
||||
root.AddCommand(
|
||||
&cobra.Command{Use: "version", Short: "Print version", Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("awesome-docker v0.1.0")
|
||||
}},
|
||||
)
|
||||
if err := root.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user