github.com/haraldrudell/parl@v0.4.176/password.go (about) 1 /* 2 © 2020–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 3 ISC License 4 */ 5 6 package parl 7 8 // Password indicates if a password can be read interactively 9 // - [pterm.NoPassword] implements password input unavailable 10 // - [pterm.NewPassword] implements interactive password input 11 type Password interface { 12 // true if a password can be obtained interactively 13 HasPassword() (hasPassword bool) 14 // blocking interactive password input 15 Password() (password []byte, err error) 16 }