Skip to content

Deprecated ioutil & os.CreateTemp#5

Closed
GreyXor wants to merge 3 commits intocli:mainfrom
GreyXor:main
Closed

Deprecated ioutil & os.CreateTemp#5
GreyXor wants to merge 3 commits intocli:mainfrom
GreyXor:main

Conversation

@GreyXor
Copy link
Copy Markdown

@GreyXor GreyXor commented Feb 11, 2023

As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details.

TempFile is deprecated : As of Go 1.17, this function simply calls os.CreateTemp.

Copy link
Copy Markdown

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Thanks, but apart from a light deprecated method cleanup, this change does not substantially improve the project, and only breaks it in certain scenarios.

Comment thread go.mod
@@ -1,5 +1,5 @@
module github.com/cli/browser

go 1.13
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi, prior to this change, this library was compatible will all Go versions since Go 1.13. Your change does a cleanup of now-deprecated functionality, but adds no features nor fixes. As a result, all that your change does is makes this library incompatible with all Go versions older than the latest version. This is a backwards-incompatible change and I'd rather not accept it.

Furthermore, this fork is supposed to be a drop-in replacement for https://github.com/pkg/browser, which supports Go 1.14 and later. We want to have the same support.

@mislav mislav closed this Feb 13, 2023
@GreyXor
Copy link
Copy Markdown
Author

GreyXor commented Feb 13, 2023

Thanks for your review

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.

2 participants