Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

GSP-137: Service Output Template #137

Closed
wants to merge 3 commits into from
Closed

Conversation

Xuanwo
Copy link
Contributor

@Xuanwo Xuanwo commented Jul 7, 2021

Signed-off-by: Xuanwo [email protected]

@Xuanwo Xuanwo changed the title Add service output template GSP-137: Service Output Template Jul 7, 2021
@Xuanwo Xuanwo requested review from a team July 7, 2021 11:54
Comment on lines +18 to +22
If service provider specify `output_template` to `%s_test.go`, `definitions` will generate files into:

- `generated_test.go`
- `service_test.go`
- `storage_test.go`
Copy link
Contributor

Choose a reason for hiding this comment

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

service.go and storage.go are formatted, not generated?


[Increase code coverage](https://github.com/beyondstorage/go-storage/issues/620) plans to move `cmd/definitions/tests` into `tests` and support generating files into `generate_test.go` so we won't export test services.

So `definitions` should have the ability to generate all files into a specified output filename template.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need this feature in definitions? If we just want to change tests, we can simply write some scripts in Makefile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we actually need this feature in definitions? If we just want to change tests, we can simply write some scripts in Makefile?

You are right. The feature is used in tests services only. I will abort this GSP and use scripts instead.

@Xuanwo Xuanwo closed this Jul 8, 2021
@Xuanwo Xuanwo deleted the add_output_template branch July 8, 2021 03:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants