8000 feat(api) adds templating to the csv formated out using go's text/template by eblechschmidt · Pull Request #32 · jsattler/go-comdirect · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(api) adds templating to the csv formated out using go's text/template #32

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

eblechschmidt
Copy link

Implements feature proposed in #22:

  • Adds default templates for all commands
  • Adds template flag to specify file name for templating csv output
  • Adds missing csv format to document command
  • Bumps all version of go.mod file to the newes version

@eblechschmidt
Copy link
Author

This is my first ever contribution/pull request so please help me if I missed something.

@jsattler jsattler self-requested a review September 16, 2023 11:17
@jsattler
Copy link
Owner

@eblechschmidt thanks for your contribution! I will review your contribution within the next days and provide feedback ☺️

Copy link
Owner
@jsattler jsattler left a comment

Choose a reason for hiding this comment

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

Thanks again for your contribution! Overall it looks good 👍🏽 my only remark/concern is the tpl package and the *.tmpl files inside. Instead of having each template inside a separate file I propose that we provide the template directly as a default inside corresponding cmd/*.go file like: tmpl, err := template.New("test").Parse("{{.Count}} example template that is currently inside tpl package {{.Example}}"). What do you think?

@@ -143,3 +139,12 @@ func printTransactionTable(transactions *comdirect.AccountTransactions) {
}
table.Render()
}

func holderName(holderName string) string {
Copy link
Owner

Choose a reason for hiding this comment

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

It seems like that this function is not used or do I miss something? In the past the length of the holderName could be quite long, that's why I limited it to 30 chars.

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
0