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

Changes to --resources argument #66

Merged
merged 2 commits into from
Aug 4, 2021
Merged

Changes to --resources argument #66

merged 2 commits into from
Aug 4, 2021

Conversation

cbandy
Copy link
Contributor

@cbandy cbandy commented Aug 4, 2021

I would like to generate docs from a single YAML file. When I tried it, I was surprised that I got neither an error nor any docs.

I'm not sure if the lack of error is intentional, so this is broken into two commits. I'm most interested in the first, which allows the argument to --resources to be a single file.

Before:

$ go run . --resources /does/not/exist --output /dev/stdout ; echo $?
# API Reference

Packages:
0

$ go run . --resources ./example/crds/example.yaml --output /dev/stdout ; echo $?
# API Reference

Packages:
0

After:

$ go run . --resources /does/not/exist --output /dev/stdout ; echo $?
stat /does/not/exist: no such file or directory
exit status 1
1

$ go run . --resources ./example/crds/example.yaml --output /dev/stdout ; echo $?
# API Reference

Packages:

- [project.io/v1alpha1](#projectiov1alpha1)

</table>
0

@cbandy cbandy requested a review from roee88 as a code owner August 4, 2021 04:42
Copy link
Contributor

@roee88 roee88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Can you please also update the help string to reflect that it can now be either a directory or a file?

crdoc/main.go

Line 86 in 519c371

cmd.Flags().StringP(resourcesOption, "r", "", "Path to directory with CustomResourceDefinition YAML files (required)")

Signed-off-by: Chris Bandy <bandy.chris@gmail.com>
Signed-off-by: Chris Bandy <bandy.chris@gmail.com>
@cbandy
Copy link
Contributor Author

cbandy commented Aug 4, 2021

Amended the first commit.

@roee88 roee88 enabled auto-merge (squash) August 4, 2021 13:36
@roee88 roee88 merged commit a3ed20a into fybrik:main Aug 4, 2021
@cbandy cbandy deleted the resources branch August 4, 2021 13:41
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.

2 participants