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

Rename conpty.New to conpty.Create #1254

Merged
merged 1 commit into from
Dec 27, 2021

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Dec 23, 2021

This change renames conpty.New, the method used to create a new ConPTY object, to Create instead. Mostly preference and to stay in line with what we'd named the method for creating a job object. The windows API used to create the pty is 'CreatePseudoConsole' so to me it makes more sense and would be more familiar to folks if this was ever moved out of /internal for outside use.

@dcantah dcantah requested a review from a team as a code owner December 23, 2021 05:26
@dcantah
Copy link
Contributor Author

dcantah commented Dec 23, 2021

conpty.ConPTY is also kind of redundant.. Perhaps a different name for the package or a different name for the struct is in order.

This change renames conpty.New, the method used to create a new ConPTY
object, to Create instead. Mostly preference and to stay in line with what
we'd named the method for creating a job object. The windows API used to
create the pty is named 'CreatePseudoConsole' so to me it makes more sense.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
@helsaawy
Copy link
Contributor

conpty.ConPTY is also kind of redundant.. Perhaps a different name for the package or a different name for the struct is in order.
I feel like conpty.PTY might reduce some (redundancy), but I am for keeping the package name.

@helsaawy
Copy link
Contributor

But also, if we are switching to Create from New to be more consistent with the Win API, then this LGTM

@dcantah
Copy link
Contributor Author

dcantah commented Dec 27, 2021

conpty.ConPTY is also kind of redundant.. Perhaps a different name for the package or a different name for the struct is in order.
I feel like conpty.PTY might reduce some (redundancy), but I am for keeping the package name.

That sounds pretty good to me and is probably better than the 'conpty.PseudoConsole' idea that was in my head haha

@dcantah dcantah merged commit 0124eb3 into microsoft:master Dec 27, 2021
dcantah added a commit to dcantah/hcsshim that referenced this pull request Jan 4, 2022
This change renames conpty.New, the method used to create a new ConPTY
object, to Create instead. Mostly preference and to stay in line with what
we'd named the method for creating a job object. The windows API used to
create the pty is named 'CreatePseudoConsole' so to me it makes more sense.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
(cherry picked from commit 0124eb3)
Signed-off-by: Daniel Canter <dcanter@microsoft.com>
dcantah added a commit to dcantah/hcsshim that referenced this pull request Jan 4, 2022
This change renames conpty.New, the method used to create a new ConPTY
object, to Create instead. Mostly preference and to stay in line with what
we'd named the method for creating a job object. The windows API used to
create the pty is named 'CreatePseudoConsole' so to me it makes more sense.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
(cherry picked from commit 0124eb3)
Signed-off-by: Daniel Canter <dcanter@microsoft.com>
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.

None yet

3 participants