1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: add input_password(prompt) and unit tests (#15507)

This commit is contained in:
Subhomoy Haldar
2022-08-23 20:47:38 +05:30
committed by GitHub
parent d08edf8cba
commit 3b42f18dee
7 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,14 @@
module main
import os
fn main() {
original_password := os.input_password('Enter your password : ')!
repeated_password := os.input_password('Confirm password : ')!
if original_password == repeated_password {
println('Password confirmed! You entered: $original_password .')
} else {
println('Passwords do not match .')
}
}