feat: initialize Go module and project skeleton

- Initialize naviwatcher Go module
- Create directory structure: internal/config/, internal/database/, cmd/naviwatcher/
- Add main.go entry point with flag parsing, config loading placeholder, and graceful shutdown skeleton
- Add dependencies: go-sqlite3, yaml.v3
- Write tests for config loading and flag parsing
- All tests pass, go vet clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 08:33:08 +03:00
parent 44f2652e7c
commit eb266ed5ec
5 changed files with 147 additions and 8 deletions

View File

@@ -55,14 +55,14 @@ Build the foundation layer of NaviWatcher: a greenfield Go project with zero exi
## Implementation Steps
### Task 1: Initialize Go module and project skeleton
- [ ] run `go mod init naviwatcher` in project root
- [ ] create directory structure: `internal/config/`, `internal/database/`, `cmd/naviwatcher/`
- [ ] create `cmd/naviwatcher/main.go` with basic entry point (parse flags, load config placeholder, graceful shutdown skeleton)
- [ ] add dependencies: `go get github.com/mattn/go-sqlite3`, `go get gopkg.in/yaml.v3`
- [ ] run `go mod tidy`
- [ ] verify the project builds: `go build -o naviwatcher ./cmd/naviwatcher`
- [ ] write tests for main.go flag parsing (if applicable)
- [ ] run tests — must pass before task 2
- [x] run `go mod init naviwatcher` in project root
- [x] create directory structure: `internal/config/`, `internal/database/`, `cmd/naviwatcher/`
- [x] create `cmd/naviwatcher/main.go` with basic entry point (parse flags, load config placeholder, graceful shutdown skeleton)
- [x] add dependencies: `go get github.com/mattn/go-sqlite3`, `go get gopkg.in/yaml.v3`
- [x] run `go mod tidy`
- [x] verify the project builds: `go build -o naviwatcher ./cmd/naviwatcher`
- [x] write tests for main.go flag parsing (if applicable)
- [x] run tests — must pass before task 2
### Task 2: Configuration management
- [ ] create `internal/config/config.go` with Config struct matching spec (Server, Navidrome, MusicBrainz, Telegram, Scanner sections)