cmd/puppeth: new version as presented at devcon3#15390
Conversation
gballet
left a comment
There was a problem hiding this comment.
From my limited perspective, it looks good to me. I would rely more on external templates and try to reduce code duplication. Cool tool though, glad I looked at the devcon pressentation!
| ) | ||
|
|
||
| // explorerDockerfile is the Dockerfile required to run a block explorer. | ||
| var explorerDockerfile = ` |
There was a problem hiding this comment.
I see that you have a lot of these files embedded into go files. How about using something like Ego ? https://github.com/benbjohnson/ego
There was a problem hiding this comment.
I did consider using external file templates and perhaps embedding them with go generate and go-bindata. But truth be told these are fairly small files, so it's less of a hassle to just keep them embedded directly and have a single place to edit and debug them.
| // String implements the stringer interface. | ||
| func (info *nodeInfos) String() string { | ||
| discv5 := "" | ||
| // Report converts the typed struct into a plain string->string map, cotnaining |
There was a problem hiding this comment.
Good catch, fixed all occurrences.
| minutes: 1440, | ||
| tiers: 3, | ||
| } | ||
| existed = false |
There was a problem hiding this comment.
so basically
existed := err == nil
There was a problem hiding this comment.
Yup, much cleaner, fixed all occurrences.
|
@gballet Thanks for the review! PTAL :) |
Ideal to have before merging:
faucetsource without needing an external repo (puppeth/go-ethereum).