diff --git a/.gitignore b/.gitignore index 3a550dc..5a806ae 100644 --- a/.gitignore +++ b/.gitignore @@ -122,6 +122,6 @@ Temporary Items *.icloud # End of https://www.toptal.com/developers/gitignore/api/go,linux,emacs,macos -my-log +/my-log cover.html cmd/test.go diff --git a/AGENTS.md b/AGENTS.md index 2f54c9d..50a1aca 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,7 +25,8 @@ - **Examples**: `✨ Add JSON export functionality for log entries`, `🐛 Fix date parsing for RFC3339 timestamps`, `📝 Update README with configuration examples` ## Project Structure -- `cmd/`: Cobra commands (root, drop, config) +- `cmd/my-log/`: Main application entrypoint +- `internal/cmd/`: Cobra commands (root, drop, config) - `models/`: Core types (Entry, Log, Meta) with marshal/unmarshal implementations - `config/`: TOML-based configuration with env overrides - `formatters/`: Output formatters (plain, json, null) diff --git a/Makefile b/Makefile index a3d8581..aaf684f 100644 --- a/Makefile +++ b/Makefile @@ -47,4 +47,4 @@ open-report: $(COVERHTML) ## Open the coverage report in the default browser build: $(OUT) ## Builds the application $(OUT): $(SOURCES) fmt - go build -o $@ + go build -o $@ ./cmd/my-log diff --git a/main.go b/cmd/my-log/main.go similarity index 93% rename from main.go rename to cmd/my-log/main.go index a23ee3c..c7f2435 100644 --- a/main.go +++ b/cmd/my-log/main.go @@ -16,7 +16,7 @@ along with this program. If not, see . */ package main -import "codeberg.org/danjones000/my-log/cmd" +import "codeberg.org/danjones000/my-log/internal/cmd" func main() { cmd.Execute() diff --git a/cmd/config.go b/internal/cmd/config.go similarity index 100% rename from cmd/config.go rename to internal/cmd/config.go diff --git a/cmd/drop.go b/internal/cmd/drop.go similarity index 100% rename from cmd/drop.go rename to internal/cmd/drop.go diff --git a/cmd/root.go b/internal/cmd/root.go similarity index 100% rename from cmd/root.go rename to internal/cmd/root.go