-
Notifications
You must be signed in to change notification settings - Fork 18
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
Adding Domain and Contact Info commands #43
base: main
Are you sure you want to change the base?
Conversation
Thanks @chriscow! Nice to hear from you. Overall the PR looks good. I’ll give it a more thorough review later. |
@@ -1,2 +1,4 @@ | |||
.DS_Store | |||
.vscode |
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.
We’ll probably end up adding a .vscode directory to this project.
@@ -1,2 +1,4 @@ | |||
.DS_Store | |||
.vscode | |||
.secrets |
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.
What’s this for?
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.
Thanks Chris!
It’s funny, we actually use an internal fork of this in Domainr’s backend. We forked it a few years ago so we could iterate on it faster. Provided it isn’t too tightly-coupled, it‘s probably time we re-upstreamed the changes we made
cmd = strings.ToLower(cmd) | ||
switch cmd { | ||
case "check": | ||
handleCheck(c, obj, objs, batch) | ||
case "info": | ||
handleInfo(c, obj, objs) | ||
default: | ||
log.Fatal("Unknown command:", cmd) | ||
} | ||
qdur := time.Since(start) | ||
|
||
color.Fprintf(os.Stderr, "@{.}Query: %s Avg: %s\n", qdur, qdur/time.Duration(len(objs))) |
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.
I’d kind of prefer if this was a subcommand, e.g. epp check [args]
and app info [args]
.
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.
I don't quite follow. Could you elaborate a couple more examples? I was following the same pattern as the check
command albeit without the batch
argument:
epp check domain1 domain2 ... domainN
epp info domain1
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.
It’s been a while since I worked on this, but it looks like the argument is epp -cmd <cmd>
and not epp <cmd>
.
"testing" | ||
) | ||
|
||
var contact1 string = ` |
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.
Can you move the test fixture below the Test func?
"strings" | ||
) | ||
|
||
type DomainStatus struct { |
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.
Please add Go doc comments to any new exported types
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.
I'm suprised I didn't get a complaint from go fmt
. I'll add those
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.
I’d be game to add a https://staticcheck.io linter to this repo’s GitHub Actions workflows.
"testing" | ||
) | ||
|
||
var info1 string = ` |
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.
Same here, functions > fixtures
I needed some info command functionality. Hoping it might be useful to others.