Skip to content

refactor: reorganize source layout to match modware-import conventions#31

Merged
cybersiddhu merged 13 commits into
developfrom
refactor/reorganize-source-layout
Mar 18, 2026
Merged

refactor: reorganize source layout to match modware-import conventions#31
cybersiddhu merged 13 commits into
developfrom
refactor/reorganize-source-layout

Conversation

@cybersiddhu
Copy link
Copy Markdown
Member

Summary

  • Moves all source from flat package main root into cmd/ + internal/ tree matching modware-import structure
  • cmd/arangoadmin/main.go — binary entrypoint
  • internal/logger/NewLogger / ParseLogLevel utilities
  • internal/arangodb/ — domain logic (types, connection, user, database, grant) + unit tests
  • internal/arangodb/cli/ — CLI command definitions and action functions + integration tests
  • All three CLI action handlers (EnsureUser, EnsureDatabase, EnsureGrant) log outside the pipeline via exported outcome functions
  • E.Fold branches extracted as point-free standalone vars using F.Bind1st / F.Bind2nd
  • Added formatters config to .golangci.yml (gci, gofmt, gofumpt, goimports, golines with chain-split-dots)

Test plan

  • go build ./... passes
  • golangci-lint run ./... passes with 0 issues
  • golangci-lint fmt ./... produces no diff
  • Integration tests pass against a live ArangoDB container (gotestsum --format dots)

🤖 Generated with Claude Code

… internal packages

Also anchor /arangoadmin in .gitignore to the root binary only,
so cmd/arangoadmin/ directory is not ignored.
…dlers

All three CLI actions (EnsureUser, EnsureDatabase, EnsureGrant) now log
outside the pipeline using LogEnsureXxxOutcome after the fold, consistent
with each other. Removed IOK wrapper functions from logger.go.
Each handler's error and success fold functions are now package-level
vars defined via F.Bind1st/F.Bind2nd, eliminating explicit argument
names from the E.Fold call sites.
…rt ordering

Enabled gci, gofmt, gofumpt, goimports, golines formatters.
gci sections: standard → external → internal (dictybase-docker prefix).
Applied golangci-lint fmt to fix import grouping across all files.
@cybersiddhu cybersiddhu merged commit 013d9da into develop Mar 18, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant