os: deprecate os.open_stdin in favor of os.stdin (#9989)

pull/9880/head^2
Leigh McCulloch 2021-05-03 08:57:21 -07:00 committed by GitHub
parent ae898e77c5
commit 4ba11b7752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -131,8 +131,14 @@ pub fn create(path string) ?File {
}
}
// open_stdin - return an os.File for stdin, so that you can use .get_line on it too.
[deprecated: 'use os.stdin() instead']
[deprecated_after: '2021-05-17']
pub fn open_stdin() File {
return stdin()
}
// stdin - return an os.File for stdin, so that you can use .get_line on it too.
pub fn stdin() File {
return File{
fd: 0
cfile: C.stdin