Initial scaffolding: module, directory structure, Makefile, linter config

This commit is contained in:
2026-03-19 11:29:32 -07:00
commit 369558132b
16 changed files with 3297 additions and 0 deletions

56
cmd/mcrsrv/main.go Normal file
View File

@@ -0,0 +1,56 @@
package main
import (
"fmt"
"os"
"github.com/spf13/cobra"
)
var version = "dev"
func main() {
root := &cobra.Command{
Use: "mcrsrv",
Short: "Metacircular Container Registry server",
Version: version,
}
root.AddCommand(serverCmd())
root.AddCommand(initCmd())
root.AddCommand(snapshotCmd())
if err := root.Execute(); err != nil {
os.Exit(1)
}
}
func serverCmd() *cobra.Command {
return &cobra.Command{
Use: "server",
Short: "Start the registry server",
RunE: func(_ *cobra.Command, _ []string) error {
return fmt.Errorf("not implemented")
},
}
}
func initCmd() *cobra.Command {
return &cobra.Command{
Use: "init",
Short: "First-time setup (create directories, example config)",
RunE: func(_ *cobra.Command, _ []string) error {
return fmt.Errorf("not implemented")
},
}
}
func snapshotCmd() *cobra.Command {
return &cobra.Command{
Use: "snapshot",
Short: "Database backup via VACUUM INTO",
RunE: func(_ *cobra.Command, _ []string) error {
return fmt.Errorf("not implemented")
},
}
}