package readline
type opPassword struct {
	o         *Operation
	backupCfg *Config
}
func newOpPassword(o *Operation) *opPassword {
	return &opPassword{o: o}
}
func (o *opPassword) ExitPasswordMode() {
	o.o.SetConfig(o.backupCfg)
	o.backupCfg = nil
}
func (o *opPassword) EnterPasswordMode(cfg *Config) (err error) {
	o.backupCfg, err = o.o.SetConfig(cfg)
	return
}
func (o *opPassword) PasswordConfig() *Config {
	return &Config{
		EnableMask:      true,
		InterruptPrompt: "\n",
		EOFPrompt:       "\n",
		HistoryLimit:    -1,
		Painter:         &defaultPainter{},
		Stdout: o.o.cfg.Stdout,
		Stderr: o.o.cfg.Stderr,
	}
}
|  | The pages are generated with Golds v0.3.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |