v / examples / password
Raw file | 14 loc (11 sloc) | 335 bytes | Latest commit hash 017ace6ea
1module main
2
3import os
4
5fn main() {
6 original_password := os.input_password('Enter your password : ')!
7 repeated_password := os.input_password('Confirm password : ')!
8
9 if original_password == repeated_password {
10 println('Password confirmed! You entered: ${original_password} .')
11 } else {
12 println('Passwords do not match .')
13 }
14}