Skip to content
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

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

Conversation

chriscow
Copy link

@chriscow chriscow commented Jul 9, 2021

I needed some info command functionality. Hoping it might be useful to others.

@ydnar
Copy link
Member

ydnar commented Jul 9, 2021

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

What’s this for?

Copy link
Member

@ydnar ydnar left a 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

Comment on lines +131 to +142
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)))
Copy link
Member

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].

Copy link
Author

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

Copy link
Member

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 = `
Copy link
Member

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 {
Copy link
Member

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

Copy link
Author

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

Copy link
Member

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 = `
Copy link
Member

Choose a reason for hiding this comment

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

Same here, functions > fixtures

@case
Copy link
Contributor

case commented Sep 22, 2021

@chriscow check out #44, which just got merged.

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.

3 participants