From 4ba11b77522b2df71c75fa8c3cfe2c4c5cfef902 Mon Sep 17 00:00:00 2001 From: Leigh McCulloch Date: Mon, 3 May 2021 08:57:21 -0700 Subject: [PATCH] os: deprecate os.open_stdin in favor of os.stdin (#9989) --- vlib/os/file.c.v | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vlib/os/file.c.v b/vlib/os/file.c.v index 1d64b6167b..22457484dc 100644 --- a/vlib/os/file.c.v +++ b/vlib/os/file.c.v @@ -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