text

package
v2.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OptionsFunc

type OptionsFunc func(*ReadPasswordFromText)

OptionsFunc is a function used to configure ReadPasswordFromText

func WithText

func WithText(text string) OptionsFunc

WithText set the text (password) into the ReadPasswordFromText

type ReadPasswordFromText

type ReadPasswordFromText struct {
	// contains filtered or unexported fields
}

ReadPasswordFromText allow to read a password as a plain text

func NewReadPasswordFromText

func NewReadPasswordFromText(options ...OptionsFunc) *ReadPasswordFromText

NewReadPasswordFromText generates a ReadPasswordFromText struct

func (*ReadPasswordFromText) Options

func (s *ReadPasswordFromText) Options(opts ...OptionsFunc)

Options configure the ReadPasswordFromText

func (*ReadPasswordFromText) Read

func (s *ReadPasswordFromText) Read() (string, error)

Read returns a password save the text attribute from the ReadPasswordFromText struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL