Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add support for overriding template dir - #50

#50
Merged
engelmi merged 2 commits into
GoTestTools:mainGoTestTools/gotestfmt:mainfrom
obfu5c8:template-dirobfu5c8/gotestfmt:template-dirCopy head branch name to clipboard
Jun 5, 2023
Merged

Add support for overriding template dir#50
engelmi merged 2 commits into
GoTestTools:mainGoTestTools/gotestfmt:mainfrom
obfu5c8:template-dirobfu5c8/gotestfmt:template-dirCopy head branch name to clipboard

Conversation

@obfu5c8

@obfu5c8 obfu5c8 commented Oct 26, 2022

Copy link
Copy Markdown
Contributor

Please describe the change you are making

I'm using some custom templates for output formatting, and trying to share them between projects.
As it stands, I have to follow an overly complex routine of writing test output json to a file, cd-ing to my templates folder and then executing gotestfmt using the -input flag. It shouldn't be this hard 😭

To make (my own) life easier, I've added an optional -template-dir flag to the cli that allows overriding the base path for template lookups. This way you can point at whatever template folder you want elsewhere on the filesystem.
To maintain b/c it defaults to ./.gotestfmt.

...

Your code will be released under the Unlicense into the public domain for everyone to use for any purpose. Are you in the position, and are you willing to release your code under this license?

👍

Add optional '-template-dir' flag to 'gotestfmt' cli command that allows overriding of the default template lookup path. Defaults to './.gotestfmt' to maintain backwards compatability.
Simplify ciEnvironments mapping to easier support dynamic root template folder.
Update 'findTemplate' function to allow passing in a root directory path that is used for os filesystem lookups, but not for embed fs lookups.
@ghost

ghost commented Mar 2, 2023

Copy link
Copy Markdown

Hey @obfu5c8 I'm terribly sorry, this PR slipped through the cracks, we'll review this within a few days.

@ghost

ghost commented May 30, 2023

Copy link
Copy Markdown

@engelmi I've reviewed this, could you also take a look please?

@engelmi

engelmi commented Jun 5, 2023

Copy link
Copy Markdown
Member

@janosdebugs LGTM as well.
@obfu5c8 I updated your branch and will create a new release soon.

@engelmi
engelmi merged commit 4c97682 into GoTestTools:main Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.