Summary:
- Created a custom CLI schema for Enbas which will act as the Source
of Truth for code and document generation.
- Created a code generator which uses the schema to generate the
executor definitions and code in the internal usage package.
Changes:
- Created the Enbas CLI schema as the Source of Truth for Enbas.
- Created the code generator that generates the executor
definitions and code in the usage package.
- Regenerated the executor definitions using the code generator.
- Moved the custom flag value types to the new internal flag
package.
- Created a new flag value type for the bool pointer to replace the
flag.BoolFunc() used for the sensitive and no-color flags.
- Moved the version and build variables to the new internal version
package to simplify the version executor.
- Created a new usage package and moved the usage functions there.
- Changed the type of the account-name flag from string to the
internal StringSliceValue type.
Changes:
- moved the command names from main to the executor package.
- moved the unknownCommandError to the executor package and renamed it
to UnknownCommandError.
- define the command summaries within the executor package.
- replace the switch statement in main.run() with a hashmap for looking
up the corresponding executor to the given command.
- transformed BlockExecutor to BlockOrUnblockExecutor.
- transformed FollowExecutor to FollowOrUnfollowExecutor.
Additional fixes:
- fixed flag for the version executor.
Changes:
- Move InvalidListRepliesPolicyError, InvalidTimelineCategory,
InvalidStatusVisibility and InvalidStatusContentTypeError type to the
model package.
- Clean up some code in regards to the parsing of the Enum types.
- Clean up the error messages sent back to the user.
- Use colons instead of semicolons when unwrapping error messages.
- Print errors to Standard Error (os.Stderr)
Move all executors to the internal folder package. This PR also comes
with additional breaking changes.
Changes:
- refactor: move all executors to the internal/executor package.
- refactor: update naming patterns for constants, variables, custom
types, etc.
- fix(breaking): renamed the update command to edit.
- fix(breaking): update the flags for the switch command to make it
more generic.
- fix(breaking): renamed the show-account-relationship flag to
show-relationship.
- fix: update the print message from the whoami command.