Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refactor main logic into cmd package and add cobra cli support #977

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

igophper
Copy link

@igophper igophper commented Jan 26, 2025

Summary

This PR adds support for the Cobra CLI, including the -v command to print the version(#901) and the -t command to test configurations(#960).

I think we might also need to modify CI-related or Docker image-related files (I didn't make changes to the CI code since I'm not very familiar with it), because the version used by -v needs to be passed during the build process:
go build -ldflags="-X github.com/TwiN/gatus/v5/cmd.version=1.0.1" .

I haven't added any test files, but I have conducted tests on my macOS, and no issues were found during the testing.

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

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