Skip to content

Commit

Permalink
refactor: major overhaul of API
Browse files Browse the repository at this point in the history
This refactor overhauls the API in preparation for v1.0.0.

Following major changes have been applied:
- Users now implement the Executor interface, instead of the Command
  interface. The Command object is now the container for a single
  command, created via the "New" factory.
- Configuration schema is read from the given Executor instance's type.
  Any field in that struct can be a potential flag or args target. The
  API now allows customization of such flags via struct field tags (to
  be documented). Configuration can be nested in multi-level structs for
  grouping and reuse.
- Commands can also be created via "MustNew" which panics if command
  creation fails.
- Better command hierarchy with clear definition of which flags are
  inherited from parent commands to child commands.
- Improved help & usage screens
- Better code & file structure
- Add golang CI linting
  • Loading branch information
arikkfir committed Jun 3, 2024
1 parent c183e9e commit 1d53c7c
Show file tree
Hide file tree
Showing 18 changed files with 3,590 additions and 811 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
fail-fast: false
matrix:
go-version: [ '1.21', '1.22' ]
permissions:
contents: read
pull-requests: read
checks: write
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,5 +30,10 @@ jobs:
- name: Download dependencies
run: go mod download -x

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest

- name: Test
run: go test ./...
Loading

0 comments on commit 1d53c7c

Please sign in to comment.