feat: initialize project structure and dependencies
- Initialize Go module with all required dependencies - Add Makefile with build targets (all, frontend, build, clean, test, run, build-linux, build-windows) - Create main.go skeleton with CLI flags (--addr, --data, --init) - Add README.md with project overview and usage instructions - Add .gitignore for bin, data, and build artifacts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
32
main.go
Normal file
32
main.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
)
|
||||
|
||||
var (
|
||||
flagAddr = flag.String("addr", ":9000", "Listen address")
|
||||
flagDataDir = flag.String("data", "./data", "Data directory")
|
||||
flagInit = flag.Bool("init", false, "Initialize database and set password")
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
fmt.Printf("GitM - Gitea Repository Sync Tool\n")
|
||||
fmt.Printf("Listen: %s\n", *flagAddr)
|
||||
fmt.Printf("Data: %s\n", *flagDataDir)
|
||||
|
||||
if *flagInit {
|
||||
fmt.Println("Initialize mode: TODO")
|
||||
return
|
||||
}
|
||||
|
||||
log.Fatal(runServer())
|
||||
}
|
||||
|
||||
func runServer() error {
|
||||
return fmt.Errorf("not implemented")
|
||||
}
|
||||
Reference in New Issue
Block a user