-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Add template feature #1
Conversation
98336b1
to
2084587
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall really good work. I'm not sure how easy it would be to add a bunch of integration tests.
action/edit.go
Outdated
@@ -8,6 +8,9 @@ import ( | |||
"os" | |||
"os/exec" | |||
|
|||
"github.com/justwatchcom/gopass/pwgen" | |||
"github.com/justwatchcom/gopass/tpl" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new line is one too much.
action/edit.go
Outdated
} else if tmpl, found := s.Store.LookupTemplate(name); found { | ||
changed = true | ||
// load template if it exists | ||
content = pwgen.GeneratePassword(24, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the default 24
should be a const shared across packages or passed down. Aren't we setting that somewhere else too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. Will change that.
This PR adds a handy template / preset feature for your password store.